Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
core.c File Reference
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/interrupt.h>
#include <linux/dma-mapping.h>
#include <linux/timex.h>
#include <linux/irq.h>
#include <linux/io.h>
#include <linux/gpio.h>
#include <linux/leds.h>
#include <linux/termios.h>
#include <linux/amba/bus.h>
#include <linux/amba/serial.h>
#include <linux/mtd/physmap.h>
#include <linux/i2c.h>
#include <linux/i2c-gpio.h>
#include <linux/spi/spi.h>
#include <linux/export.h>
#include <mach/hardware.h>
#include <linux/platform_data/video-ep93xx.h>
#include <linux/platform_data/keypad-ep93xx.h>
#include <linux/platform_data/spi-ep93xx.h>
#include <mach/gpio-ep93xx.h>
#include <asm/mach/map.h>
#include <asm/mach/time.h>
#include <asm/hardware/vic.h>
#include "soc.h"

Go to the source code of this file.

Macros

#define pr_fmt(fmt)   "ep93xx " KBUILD_MODNAME ": " fmt
 
#define EP93XX_TIMER_REG(x)   (EP93XX_TIMER_BASE + (x))
 
#define EP93XX_TIMER1_LOAD   EP93XX_TIMER_REG(0x00)
 
#define EP93XX_TIMER1_VALUE   EP93XX_TIMER_REG(0x04)
 
#define EP93XX_TIMER1_CONTROL   EP93XX_TIMER_REG(0x08)
 
#define EP93XX_TIMER123_CONTROL_ENABLE   (1 << 7)
 
#define EP93XX_TIMER123_CONTROL_MODE   (1 << 6)
 
#define EP93XX_TIMER123_CONTROL_CLKSEL   (1 << 3)
 
#define EP93XX_TIMER1_CLEAR   EP93XX_TIMER_REG(0x0c)
 
#define EP93XX_TIMER2_LOAD   EP93XX_TIMER_REG(0x20)
 
#define EP93XX_TIMER2_VALUE   EP93XX_TIMER_REG(0x24)
 
#define EP93XX_TIMER2_CONTROL   EP93XX_TIMER_REG(0x28)
 
#define EP93XX_TIMER2_CLEAR   EP93XX_TIMER_REG(0x2c)
 
#define EP93XX_TIMER4_VALUE_LOW   EP93XX_TIMER_REG(0x60)
 
#define EP93XX_TIMER4_VALUE_HIGH   EP93XX_TIMER_REG(0x64)
 
#define EP93XX_TIMER4_VALUE_HIGH_ENABLE   (1 << 8)
 
#define EP93XX_TIMER3_LOAD   EP93XX_TIMER_REG(0x80)
 
#define EP93XX_TIMER3_VALUE   EP93XX_TIMER_REG(0x84)
 
#define EP93XX_TIMER3_CONTROL   EP93XX_TIMER_REG(0x88)
 
#define EP93XX_TIMER3_CLEAR   EP93XX_TIMER_REG(0x8c)
 
#define EP93XX_TIMER123_CLOCK   508469
 
#define EP93XX_TIMER4_CLOCK   983040
 
#define TIMER1_RELOAD   ((EP93XX_TIMER123_CLOCK / HZ) - 1)
 
#define TIMER4_TICKS_PER_JIFFY   DIV_ROUND_CLOSEST(CLOCK_TICK_RATE, HZ)
 
#define EP93XX_UART_MCR_OFFSET   (0x0100)
 
#define EP93XX_RASTER_REG_BRIGHTNESS   0x20
 
#define EP93XX_SYSCON_DEVCFG_I2S_MASK
 
#define EP93XX_I2SCLKDIV_MASK
 

Functions

void __init ep93xx_map_io (void)
 
void __init ep93xx_init_irq (void)
 
void ep93xx_syscon_swlocked_write (unsigned int val, void __iomem *reg)
 
void ep93xx_devcfg_set_clear (unsigned int set_bits, unsigned int clear_bits)
 
unsigned int ep93xx_chip_revision (void)
 
void __init ep93xx_register_flash (unsigned int width, resource_size_t start, resource_size_t size)
 
void __init ep93xx_register_eth (struct ep93xx_eth_data *data, int copy_addr)
 
void __init ep93xx_register_i2c (struct i2c_gpio_platform_data *data, struct i2c_board_info *devices, int num)
 
void __init ep93xx_register_spi (struct ep93xx_spi_info *info, struct spi_board_info *devices, int num)
 
void __init ep93xx_register_pwm (int pwm0, int pwm1)
 
int ep93xx_pwm_acquire_gpio (struct platform_device *pdev)
 
 EXPORT_SYMBOL (ep93xx_pwm_acquire_gpio)
 
void ep93xx_pwm_release_gpio (struct platform_device *pdev)
 
 EXPORT_SYMBOL (ep93xx_pwm_release_gpio)
 
void __init ep93xx_register_fb (struct ep93xxfb_mach_info *data)
 
void __init ep93xx_register_keypad (struct ep93xx_keypad_platform_data *data)
 
int ep93xx_keypad_acquire_gpio (struct platform_device *pdev)
 
 EXPORT_SYMBOL (ep93xx_keypad_acquire_gpio)
 
void ep93xx_keypad_release_gpio (struct platform_device *pdev)
 
 EXPORT_SYMBOL (ep93xx_keypad_release_gpio)
 
void __init ep93xx_register_i2s (void)
 
int ep93xx_i2s_acquire (void)
 
 EXPORT_SYMBOL (ep93xx_i2s_acquire)
 
void ep93xx_i2s_release (void)
 
 EXPORT_SYMBOL (ep93xx_i2s_release)
 
void __init ep93xx_register_ac97 (void)
 
void __init ep93xx_register_ide (void)
 
int ep93xx_ide_acquire_gpio (struct platform_device *pdev)
 
 EXPORT_SYMBOL (ep93xx_ide_acquire_gpio)
 
void ep93xx_ide_release_gpio (struct platform_device *pdev)
 
 EXPORT_SYMBOL (ep93xx_ide_release_gpio)
 
void __init ep93xx_init_devices (void)
 
void ep93xx_restart (char mode, const char *cmd)
 
void __init ep93xx_init_late (void)
 

Variables

struct sys_timer ep93xx_timer
 

Macro Definition Documentation

#define EP93XX_I2SCLKDIV_MASK
Value:
EP93XX_SYSCON_I2SCLKDIV_SPOL)

Definition at line 729 of file core.c.

#define EP93XX_RASTER_REG_BRIGHTNESS   0x20

Definition at line 599 of file core.c.

#define EP93XX_SYSCON_DEVCFG_I2S_MASK
Value:
EP93XX_SYSCON_DEVCFG_I2SONAC97)

Definition at line 726 of file core.c.

#define EP93XX_TIMER123_CLOCK   508469

Definition at line 113 of file core.c.

#define EP93XX_TIMER123_CONTROL_CLKSEL   (1 << 3)

Definition at line 99 of file core.c.

#define EP93XX_TIMER123_CONTROL_ENABLE   (1 << 7)

Definition at line 97 of file core.c.

#define EP93XX_TIMER123_CONTROL_MODE   (1 << 6)

Definition at line 98 of file core.c.

#define EP93XX_TIMER1_CLEAR   EP93XX_TIMER_REG(0x0c)

Definition at line 100 of file core.c.

#define EP93XX_TIMER1_CONTROL   EP93XX_TIMER_REG(0x08)

Definition at line 96 of file core.c.

#define EP93XX_TIMER1_LOAD   EP93XX_TIMER_REG(0x00)

Definition at line 94 of file core.c.

#define EP93XX_TIMER1_VALUE   EP93XX_TIMER_REG(0x04)

Definition at line 95 of file core.c.

#define EP93XX_TIMER2_CLEAR   EP93XX_TIMER_REG(0x2c)

Definition at line 104 of file core.c.

#define EP93XX_TIMER2_CONTROL   EP93XX_TIMER_REG(0x28)

Definition at line 103 of file core.c.

#define EP93XX_TIMER2_LOAD   EP93XX_TIMER_REG(0x20)

Definition at line 101 of file core.c.

#define EP93XX_TIMER2_VALUE   EP93XX_TIMER_REG(0x24)

Definition at line 102 of file core.c.

#define EP93XX_TIMER3_CLEAR   EP93XX_TIMER_REG(0x8c)

Definition at line 111 of file core.c.

#define EP93XX_TIMER3_CONTROL   EP93XX_TIMER_REG(0x88)

Definition at line 110 of file core.c.

#define EP93XX_TIMER3_LOAD   EP93XX_TIMER_REG(0x80)

Definition at line 108 of file core.c.

#define EP93XX_TIMER3_VALUE   EP93XX_TIMER_REG(0x84)

Definition at line 109 of file core.c.

#define EP93XX_TIMER4_CLOCK   983040

Definition at line 114 of file core.c.

#define EP93XX_TIMER4_VALUE_HIGH   EP93XX_TIMER_REG(0x64)

Definition at line 106 of file core.c.

#define EP93XX_TIMER4_VALUE_HIGH_ENABLE   (1 << 8)

Definition at line 107 of file core.c.

#define EP93XX_TIMER4_VALUE_LOW   EP93XX_TIMER_REG(0x60)

Definition at line 105 of file core.c.

#define EP93XX_TIMER_REG (   x)    (EP93XX_TIMER_BASE + (x))

Definition at line 93 of file core.c.

#define EP93XX_UART_MCR_OFFSET   (0x0100)

Definition at line 257 of file core.c.

#define pr_fmt (   fmt)    "ep93xx " KBUILD_MODNAME ": " fmt

Definition at line 17 of file core.c.

#define TIMER1_RELOAD   ((EP93XX_TIMER123_CLOCK / HZ) - 1)

Definition at line 116 of file core.c.

#define TIMER4_TICKS_PER_JIFFY   DIV_ROUND_CLOSEST(CLOCK_TICK_RATE, HZ)

Definition at line 117 of file core.c.

Function Documentation

unsigned int ep93xx_chip_revision ( void  )

ep93xx_chip_revision() - returns the EP93xx chip revision

See <mach/platform.h> for more information.

Definition at line 230 of file core.c.

void ep93xx_devcfg_set_clear ( unsigned int  set_bits,
unsigned int  clear_bits 
)

Definition at line 209 of file core.c.

int ep93xx_i2s_acquire ( void  )

Definition at line 732 of file core.c.

void ep93xx_i2s_release ( void  )

Definition at line 754 of file core.c.

int ep93xx_ide_acquire_gpio ( struct platform_device pdev)

Definition at line 824 of file core.c.

void ep93xx_ide_release_gpio ( struct platform_device pdev)

Definition at line 875 of file core.c.

void __init ep93xx_init_devices ( void  )

Definition at line 896 of file core.c.

void __init ep93xx_init_irq ( void  )

Definition at line 180 of file core.c.

void __init ep93xx_init_late ( void  )

Definition at line 934 of file core.c.

int ep93xx_keypad_acquire_gpio ( struct platform_device pdev)

Definition at line 655 of file core.c.

void ep93xx_keypad_release_gpio ( struct platform_device pdev)

Definition at line 686 of file core.c.

void __init ep93xx_map_io ( void  )

Definition at line 68 of file core.c.

int ep93xx_pwm_acquire_gpio ( struct platform_device pdev)

Definition at line 535 of file core.c.

void ep93xx_pwm_release_gpio ( struct platform_device pdev)

Definition at line 564 of file core.c.

void __init ep93xx_register_ac97 ( void  )

Definition at line 775 of file core.c.

void __init ep93xx_register_eth ( struct ep93xx_eth_data data,
int  copy_addr 
)

ep93xx_register_eth - Register the built-in ethernet platform device. : platform specific ethernet configuration (__initdata) : flag indicating that the MAC address should be copied from the IndAd registers (as programmed by the bootloader)

Definition at line 383 of file core.c.

void __init ep93xx_register_fb ( struct ep93xxfb_mach_info data)

ep93xx_register_fb - Register the framebuffer platform device. : platform specific framebuffer configuration (__initdata)

Definition at line 617 of file core.c.

void __init ep93xx_register_flash ( unsigned int  width,
resource_size_t  start,
resource_size_t  size 
)

ep93xx_register_flash() - Register the external flash device. : bank width in octets : resource start address : resource size

Definition at line 341 of file core.c.

void __init ep93xx_register_i2c ( struct i2c_gpio_platform_data data,
struct i2c_board_info devices,
int  num 
)

ep93xx_register_i2c - Register the i2c platform device. : platform specific i2c-gpio configuration (__initdata) : platform specific i2c bus device information (__initdata) : the number of devices on the i2c bus

Definition at line 412 of file core.c.

void __init ep93xx_register_i2s ( void  )

Definition at line 720 of file core.c.

void __init ep93xx_register_ide ( void  )

Definition at line 819 of file core.c.

void __init ep93xx_register_keypad ( struct ep93xx_keypad_platform_data data)

ep93xx_register_keypad - Register the keypad platform device. : platform specific keypad configuration (__initdata)

Definition at line 649 of file core.c.

void __init ep93xx_register_pwm ( int  pwm0,
int  pwm1 
)

Definition at line 525 of file core.c.

void __init ep93xx_register_spi ( struct ep93xx_spi_info info,
struct spi_board_info devices,
int  num 
)

ep93xx_register_spi() - registers spi platform device : ep93xx board specific spi master info (__initdata) : SPI devices to register (__initdata) : number of SPI devices to register

This function registers platform device for the EP93xx SPI controller and also makes sure that SPI pins are muxed so that I2S is not using those pins.

Definition at line 468 of file core.c.

void ep93xx_restart ( char  mode,
const char cmd 
)

Definition at line 922 of file core.c.

void ep93xx_syscon_swlocked_write ( unsigned int  val,
void __iomem reg 
)

Definition at line 197 of file core.c.

EXPORT_SYMBOL ( ep93xx_pwm_acquire_gpio  )
EXPORT_SYMBOL ( ep93xx_pwm_release_gpio  )
EXPORT_SYMBOL ( ep93xx_keypad_acquire_gpio  )
EXPORT_SYMBOL ( ep93xx_keypad_release_gpio  )
EXPORT_SYMBOL ( ep93xx_i2s_acquire  )
EXPORT_SYMBOL ( ep93xx_i2s_release  )
EXPORT_SYMBOL ( ep93xx_ide_acquire_gpio  )
EXPORT_SYMBOL ( ep93xx_ide_release_gpio  )

Variable Documentation

struct sys_timer ep93xx_timer
Initial value:
= {
.init = ep93xx_timer_init,
.offset = ep93xx_gettimeoffset,
}

Definition at line 171 of file core.c.