Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
fsl_lbc.c File Reference
#include <linux/init.h>
#include <linux/export.h>
#include <linux/kernel.h>
#include <linux/compiler.h>
#include <linux/spinlock.h>
#include <linux/types.h>
#include <linux/io.h>
#include <linux/of.h>
#include <linux/slab.h>
#include <linux/sched.h>
#include <linux/platform_device.h>
#include <linux/interrupt.h>
#include <linux/mod_devicetable.h>
#include <asm/prom.h>
#include <asm/fsl_lbc.h>

Go to the source code of this file.

Functions

 EXPORT_SYMBOL (fsl_lbc_ctrl_dev)
 
u32 fsl_lbc_addr (phys_addr_t addr_base)
 
 EXPORT_SYMBOL (fsl_lbc_addr)
 
int fsl_lbc_find (phys_addr_t addr_base)
 
 EXPORT_SYMBOL (fsl_lbc_find)
 
int fsl_upm_find (phys_addr_t addr_base, struct fsl_upm *upm)
 
 EXPORT_SYMBOL (fsl_upm_find)
 
int fsl_upm_run_pattern (struct fsl_upm *upm, void __iomem *io_base, u32 mar)
 
 EXPORT_SYMBOL (fsl_upm_run_pattern)
 
 module_init (fsl_lbc_init)
 

Variables

struct fsl_lbc_ctrlfsl_lbc_ctrl_dev
 

Function Documentation

EXPORT_SYMBOL ( fsl_lbc_ctrl_dev  )
EXPORT_SYMBOL ( fsl_lbc_addr  )
EXPORT_SYMBOL ( fsl_lbc_find  )
EXPORT_SYMBOL ( fsl_upm_find  )
EXPORT_SYMBOL ( fsl_upm_run_pattern  )
u32 fsl_lbc_addr ( phys_addr_t  addr_base)

fsl_lbc_addr - convert the base address : base address of the memory bank

This function converts a base address of lbc into the right format for the BR register. If the SOC has eLBC then it returns 32bit physical address else it convers a 34bit local bus physical address to correct format of 32bit address for BR register (Example: MPC8641).

Definition at line 46 of file fsl_lbc.c.

int fsl_lbc_find ( phys_addr_t  addr_base)

fsl_lbc_find - find Localbus bank : base address of the memory bank

This function walks LBC banks comparing "Base address" field of the BR registers with the supplied addr_base argument. When bases match this function returns bank number (starting with 0), otherwise it returns appropriate errno value.

Definition at line 67 of file fsl_lbc.c.

int fsl_upm_find ( phys_addr_t  addr_base,
struct fsl_upm upm 
)

fsl_upm_find - find pre-programmed UPM via base address : base address of the memory bank controlled by the UPM : pointer to the allocated fsl_upm structure

This function fills fsl_upm structure so you can use it with the rest of UPM API. On success this function returns 0, otherwise it returns appropriate errno value.

Definition at line 97 of file fsl_lbc.c.

int fsl_upm_run_pattern ( struct fsl_upm upm,
void __iomem io_base,
u32  mar 
)

fsl_upm_run_pattern - actually run an UPM pattern : pointer to the fsl_upm structure obtained via fsl_upm_find : remapped pointer to where memory access should happen : MAR register content during pattern execution

This function triggers dummy write to the memory specified by the io_base, thus UPM pattern actually executed. Note that mar usage depends on the pre-programmed AMX bits in the UPM RAM.

Definition at line 155 of file fsl_lbc.c.

module_init ( fsl_lbc_init  )

Variable Documentation

struct fsl_lbc_ctrl* fsl_lbc_ctrl_dev

Definition at line 34 of file fsl_lbc.c.