24 #include <linux/device.h>
35 #include <mach/hardware.h>
47 #include <mach/platform.h>
48 #include <mach/irqs.h>
56 #define REALVIEW_FLASHCTRL (__io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_FLASH_OFFSET)
58 static void realview_flash_set_vpp(
struct platform_device *pdev,
int on)
72 .set_vpp = realview_flash_set_vpp,
76 .name =
"physmap-flash",
79 .platform_data = &realview_flash_data,
108 if (
strcmp(realview_eth_device.
name,
"smsc911x") == 0)
109 realview_eth_device.
dev.platform_data = &smsc911x_config;
129 static struct resource pata_resources[] = {
143 .name =
"pata_platform",
146 .resource = pata_resources,
148 .platform_data = &pata_platform_data,
152 static struct resource realview_i2c_resource = {
159 .name =
"versatile-i2c",
162 .resource = &realview_i2c_resource,
171 static int __init realview_i2c_init(
void)
178 #define REALVIEW_SYSMCI (__io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_MCI_OFFSET)
183 static unsigned int realview_mmc_status(
struct device *
dev)
188 if (machine_is_realview_pb1176()) {
189 static bool inserted =
false;
199 inserted = !inserted;
200 return inserted ? 0 : 1;
213 .status = realview_mmc_status,
221 .status = realview_mmc_status,
237 #define SYS_CLCD_NLCDIOON (1 << 2)
238 #define SYS_CLCD_VDDPOSSWITCH (1 << 3)
239 #define SYS_CLCD_PWR3V5SWITCH (1 << 4)
240 #define SYS_CLCD_ID_MASK (0x1f << 8)
241 #define SYS_CLCD_ID_SANYO_3_8 (0x00 << 8)
242 #define SYS_CLCD_ID_UNKNOWN_8_4 (0x01 << 8)
243 #define SYS_CLCD_ID_EPSON_2_2 (0x02 << 8)
244 #define SYS_CLCD_ID_SANYO_2_5 (0x07 << 8)
245 #define SYS_CLCD_ID_VGA (0x1f << 8)
250 static void realview_clcd_disable(
struct clcd_fb *
fb)
255 val =
readl(sys_clcd);
263 static void realview_clcd_enable(
struct clcd_fb *
fb)
271 val =
readl(sys_clcd);
282 static int realview_clcd_setup(
struct clcd_fb *
fb)
285 const char *panel_name, *vga_panel_name;
286 unsigned long framesize;
289 if (machine_is_realview_eb()) {
291 framesize = 640 * 480 * 2;
292 vga_panel_name =
"VGA";
295 framesize = 1024 * 768 * 2;
296 vga_panel_name =
"XVGA";
301 panel_name =
"Sanyo TM38QV67A02A";
303 panel_name =
"Sanyo QVGA Portrait";
305 panel_name =
"Epson L2F50113T00";
307 panel_name = vga_panel_name;
309 pr_err(
"CLCD: unknown LCD panel ID 0x%08x, using VGA\n", val);
310 panel_name = vga_panel_name;
323 .check = clcdfb_check,
324 .decode = clcdfb_decode,
325 .disable = realview_clcd_disable,
326 .enable = realview_clcd_enable,
327 .setup = realview_clcd_setup,
367 sp804_clocksource_init(timer3_va_base,
"timer3");
380 #ifdef CONFIG_REALVIEW_HIGH_PHYS_OFFSET
381 meminfo->
bank[0].start = 0x70000000;
385 meminfo->
bank[0].start = 0;