diff options
| author | Paul Mackerras <paulus@samba.org> | 2008-09-09 21:36:13 -0400 |
|---|---|---|
| committer | Paul Mackerras <paulus@samba.org> | 2008-09-09 21:36:13 -0400 |
| commit | 7e392f8c29ee045c6a29d50193d2fb10712eceb0 (patch) | |
| tree | c84097fe644c50c82f087ab7fa2d75167b8c0e16 /arch/sh/boards/mach-sh7763rdp/setup.c | |
| parent | 7713fef06517d216f96ee7c8ad750e72bc08d38f (diff) | |
| parent | 93811d94f7e9bcfeed7d6ba75ea5d9c80a70ab95 (diff) | |
Merge branch 'linux-2.6'
Diffstat (limited to 'arch/sh/boards/mach-sh7763rdp/setup.c')
| -rw-r--r-- | arch/sh/boards/mach-sh7763rdp/setup.c | 84 |
1 files changed, 82 insertions, 2 deletions
diff --git a/arch/sh/boards/mach-sh7763rdp/setup.c b/arch/sh/boards/mach-sh7763rdp/setup.c index 925f16af7121..23850da05e3c 100644 --- a/arch/sh/boards/mach-sh7763rdp/setup.c +++ b/arch/sh/boards/mach-sh7763rdp/setup.c | |||
| @@ -15,8 +15,11 @@ | |||
| 15 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
| 16 | #include <linux/input.h> | 16 | #include <linux/input.h> |
| 17 | #include <linux/mtd/physmap.h> | 17 | #include <linux/mtd/physmap.h> |
| 18 | #include <asm/io.h> | 18 | #include <linux/fb.h> |
| 19 | #include <linux/io.h> | ||
| 19 | #include <asm/sh7763rdp.h> | 20 | #include <asm/sh7763rdp.h> |
| 21 | #include <asm/sh_eth.h> | ||
| 22 | #include <asm/sh7760fb.h> | ||
| 20 | 23 | ||
| 21 | /* NOR Flash */ | 24 | /* NOR Flash */ |
| 22 | static struct mtd_partition sh7763rdp_nor_flash_partitions[] = { | 25 | static struct mtd_partition sh7763rdp_nor_flash_partitions[] = { |
| @@ -60,8 +63,85 @@ static struct platform_device sh7763rdp_nor_flash_device = { | |||
| 60 | }, | 63 | }, |
| 61 | }; | 64 | }; |
| 62 | 65 | ||
| 66 | /* SH-Ether */ | ||
| 67 | static struct resource sh_eth_resources[] = { | ||
| 68 | { | ||
| 69 | .start = 0xFEE00800, /* use eth1 */ | ||
| 70 | .end = 0xFEE00F7C - 1, | ||
| 71 | .flags = IORESOURCE_MEM, | ||
| 72 | }, { | ||
| 73 | .start = 58, /* irq number */ | ||
| 74 | .end = 58, | ||
| 75 | .flags = IORESOURCE_IRQ, | ||
| 76 | }, | ||
| 77 | }; | ||
| 78 | |||
| 79 | static struct sh_eth_plat_data sh7763_eth_pdata = { | ||
| 80 | .phy = 1, | ||
| 81 | .edmac_endian = EDMAC_LITTLE_ENDIAN, | ||
| 82 | }; | ||
| 83 | |||
| 84 | static struct platform_device sh7763rdp_eth_device = { | ||
| 85 | .name = "sh-eth", | ||
| 86 | .resource = sh_eth_resources, | ||
| 87 | .num_resources = ARRAY_SIZE(sh_eth_resources), | ||
| 88 | .dev = { | ||
| 89 | .platform_data = &sh7763_eth_pdata, | ||
| 90 | }, | ||
| 91 | }; | ||
| 92 | |||
| 93 | /* SH7763 LCDC */ | ||
| 94 | static struct resource sh7763rdp_fb_resources[] = { | ||
| 95 | { | ||
| 96 | .start = 0xFFE80000, | ||
| 97 | .end = 0xFFE80442 - 1, | ||
| 98 | .flags = IORESOURCE_MEM, | ||
| 99 | }, | ||
| 100 | }; | ||
| 101 | |||
| 102 | static struct fb_videomode sh7763fb_videomode = { | ||
| 103 | .refresh = 60, | ||
| 104 | .name = "VGA Monitor", | ||
| 105 | .xres = 640, | ||
| 106 | .yres = 480, | ||
| 107 | .pixclock = 10000, | ||
| 108 | .left_margin = 80, | ||
| 109 | .right_margin = 24, | ||
| 110 | .upper_margin = 30, | ||
| 111 | .lower_margin = 1, | ||
| 112 | .hsync_len = 96, | ||
| 113 | .vsync_len = 1, | ||
| 114 | .sync = 0, | ||
| 115 | .vmode = FB_VMODE_NONINTERLACED, | ||
| 116 | .flag = FBINFO_FLAG_DEFAULT, | ||
| 117 | }; | ||
| 118 | |||
| 119 | static struct sh7760fb_platdata sh7763fb_def_pdata = { | ||
| 120 | .def_mode = &sh7763fb_videomode, | ||
| 121 | .ldmtr = (LDMTR_TFT_COLOR_16|LDMTR_MCNT), | ||
| 122 | .lddfr = LDDFR_16BPP_RGB565, | ||
| 123 | .ldpmmr = 0x0000, | ||
| 124 | .ldpspr = 0xFFFF, | ||
| 125 | .ldaclnr = 0x0001, | ||
| 126 | .ldickr = 0x1102, | ||
| 127 | .rotate = 0, | ||
| 128 | .novsync = 0, | ||
| 129 | .blank = NULL, | ||
| 130 | }; | ||
| 131 | |||
| 132 | static struct platform_device sh7763rdp_fb_device = { | ||
| 133 | .name = "sh7760-lcdc", | ||
| 134 | .resource = sh7763rdp_fb_resources, | ||
| 135 | .num_resources = ARRAY_SIZE(sh7763rdp_fb_resources), | ||
| 136 | .dev = { | ||
| 137 | .platform_data = &sh7763fb_def_pdata, | ||
| 138 | }, | ||
| 139 | }; | ||
| 140 | |||
| 63 | static struct platform_device *sh7763rdp_devices[] __initdata = { | 141 | static struct platform_device *sh7763rdp_devices[] __initdata = { |
| 64 | &sh7763rdp_nor_flash_device, | 142 | &sh7763rdp_nor_flash_device, |
| 143 | &sh7763rdp_eth_device, | ||
| 144 | &sh7763rdp_fb_device, | ||
| 65 | }; | 145 | }; |
| 66 | 146 | ||
| 67 | static int __init sh7763rdp_devices_setup(void) | 147 | static int __init sh7763rdp_devices_setup(void) |
| @@ -69,7 +149,7 @@ static int __init sh7763rdp_devices_setup(void) | |||
| 69 | return platform_add_devices(sh7763rdp_devices, | 149 | return platform_add_devices(sh7763rdp_devices, |
| 70 | ARRAY_SIZE(sh7763rdp_devices)); | 150 | ARRAY_SIZE(sh7763rdp_devices)); |
| 71 | } | 151 | } |
| 72 | __initcall(sh7763rdp_devices_setup); | 152 | device_initcall(sh7763rdp_devices_setup); |
| 73 | 153 | ||
| 74 | static void __init sh7763rdp_setup(char **cmdline_p) | 154 | static void __init sh7763rdp_setup(char **cmdline_p) |
| 75 | { | 155 | { |
