aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-11-30 00:53:45 -0500
committerPaul Mundt <lethal@linux-sh.org>2010-11-30 00:53:45 -0500
commit2818b19102fdc414248f772c46af176d36520ae7 (patch)
tree0a6f666ab02c12f308de6352a74c8fbc86e36343
parent0ae26c8cf71f3c65b69a40d45c48e6c6195ac617 (diff)
parent25338f2e09fcbaa0470841c928bf0e718ca13382 (diff)
Merge branch 'rmobile/mackerel' into rmobile-latest
Conflicts: arch/arm/mach-shmobile/Kconfig arch/arm/mach-shmobile/Makefile Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r--arch/arm/configs/mackerel_defconfig138
-rw-r--r--arch/arm/mach-shmobile/Kconfig9
-rw-r--r--arch/arm/mach-shmobile/Makefile1
-rw-r--r--arch/arm/mach-shmobile/board-mackerel.c418
4 files changed, 563 insertions, 3 deletions
diff --git a/arch/arm/configs/mackerel_defconfig b/arch/arm/configs/mackerel_defconfig
new file mode 100644
index 000000000000..306a2e2d3622
--- /dev/null
+++ b/arch/arm/configs/mackerel_defconfig
@@ -0,0 +1,138 @@
1CONFIG_EXPERIMENTAL=y
2CONFIG_SYSVIPC=y
3CONFIG_IKCONFIG=y
4CONFIG_IKCONFIG_PROC=y
5CONFIG_LOG_BUF_SHIFT=16
6# CONFIG_UTS_NS is not set
7# CONFIG_IPC_NS is not set
8# CONFIG_USER_NS is not set
9# CONFIG_PID_NS is not set
10# CONFIG_NET_NS is not set
11CONFIG_SLAB=y
12CONFIG_MODULES=y
13CONFIG_MODULE_UNLOAD=y
14# CONFIG_BLK_DEV_BSG is not set
15# CONFIG_IOSCHED_DEADLINE is not set
16# CONFIG_IOSCHED_CFQ is not set
17CONFIG_ARCH_SHMOBILE=y
18CONFIG_ARCH_SH7372=y
19CONFIG_MACH_MACKEREL=y
20CONFIG_MEMORY_SIZE=0x10000000
21CONFIG_AEABI=y
22# CONFIG_OABI_COMPAT is not set
23CONFIG_FORCE_MAX_ZONEORDER=15
24CONFIG_ZBOOT_ROM_TEXT=0x0
25CONFIG_ZBOOT_ROM_BSS=0x0
26CONFIG_CMDLINE="console=tty0, console=ttySC0,115200 earlyprintk=sh-sci.0,115200 root=/dev/nfs nfsroot=,tcp,v3 ip=dhcp memchunk.vpu=64m memchunk.veu0=8m memchunk.spu0=2m mem=240m"
27CONFIG_KEXEC=y
28# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
29CONFIG_PM=y
30CONFIG_PM_RUNTIME=y
31CONFIG_NET=y
32CONFIG_PACKET=y
33CONFIG_UNIX=y
34CONFIG_INET=y
35CONFIG_IP_MULTICAST=y
36CONFIG_IP_PNP=y
37CONFIG_IP_PNP_DHCP=y
38# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
39# CONFIG_INET_XFRM_MODE_TUNNEL is not set
40# CONFIG_INET_XFRM_MODE_BEET is not set
41# CONFIG_IPV6 is not set
42# CONFIG_WIRELESS is not set
43CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
44# CONFIG_FIRMWARE_IN_KERNEL is not set
45CONFIG_MTD=y
46CONFIG_MTD_CONCAT=y
47CONFIG_MTD_PARTITIONS=y
48CONFIG_MTD_CHAR=y
49CONFIG_MTD_BLOCK=y
50CONFIG_MTD_CFI=y
51CONFIG_MTD_CFI_ADV_OPTIONS=y
52CONFIG_MTD_CFI_INTELEXT=y
53CONFIG_MTD_PHYSMAP=y
54CONFIG_MTD_ARM_INTEGRATOR=y
55CONFIG_MTD_BLOCK2MTD=y
56CONFIG_SCSI=y
57CONFIG_BLK_DEV_SD=y
58# CONFIG_SCSI_LOWLEVEL is not set
59CONFIG_NETDEVICES=y
60CONFIG_NET_ETHERNET=y
61CONFIG_SMSC911X=y
62# CONFIG_NETDEV_1000 is not set
63# CONFIG_NETDEV_10000 is not set
64# CONFIG_WLAN is not set
65# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
66# CONFIG_INPUT_KEYBOARD is not set
67# CONFIG_INPUT_MOUSE is not set
68CONFIG_SERIAL_SH_SCI=y
69CONFIG_SERIAL_SH_SCI_NR_UARTS=8
70CONFIG_SERIAL_SH_SCI_CONSOLE=y
71# CONFIG_LEGACY_PTYS is not set
72# CONFIG_HW_RANDOM is not set
73# CONFIG_HWMON is not set
74# CONFIG_MFD_SUPPORT is not set
75CONFIG_FB=y
76CONFIG_FB_MODE_HELPERS=y
77CONFIG_FB_SH_MOBILE_LCDC=y
78CONFIG_FRAMEBUFFER_CONSOLE=y
79CONFIG_LOGO=y
80# CONFIG_LOGO_LINUX_MONO is not set
81# CONFIG_LOGO_LINUX_CLUT224 is not set
82# CONFIG_HID_SUPPORT is not set
83# CONFIG_USB_SUPPORT is not set
84CONFIG_EXT2_FS=y
85CONFIG_EXT2_FS_XATTR=y
86CONFIG_EXT2_FS_POSIX_ACL=y
87CONFIG_EXT2_FS_SECURITY=y
88CONFIG_EXT2_FS_XIP=y
89CONFIG_EXT3_FS=y
90# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
91CONFIG_EXT3_FS_POSIX_ACL=y
92CONFIG_EXT3_FS_SECURITY=y
93# CONFIG_DNOTIFY is not set
94# CONFIG_INOTIFY_USER is not set
95CONFIG_MSDOS_FS=y
96CONFIG_VFAT_FS=y
97CONFIG_TMPFS=y
98# CONFIG_MISC_FILESYSTEMS is not set
99CONFIG_NFS_FS=y
100CONFIG_NFS_V3=y
101CONFIG_NFS_V3_ACL=y
102CONFIG_NFS_V4=y
103CONFIG_NFS_V4_1=y
104CONFIG_ROOT_NFS=y
105CONFIG_NLS_CODEPAGE_437=y
106CONFIG_NLS_CODEPAGE_737=y
107CONFIG_NLS_CODEPAGE_775=y
108CONFIG_NLS_CODEPAGE_850=y
109CONFIG_NLS_CODEPAGE_852=y
110CONFIG_NLS_CODEPAGE_855=y
111CONFIG_NLS_CODEPAGE_857=y
112CONFIG_NLS_CODEPAGE_860=y
113CONFIG_NLS_CODEPAGE_861=y
114CONFIG_NLS_CODEPAGE_862=y
115CONFIG_NLS_CODEPAGE_863=y
116CONFIG_NLS_CODEPAGE_864=y
117CONFIG_NLS_CODEPAGE_865=y
118CONFIG_NLS_CODEPAGE_866=y
119CONFIG_NLS_CODEPAGE_869=y
120CONFIG_NLS_ISO8859_1=y
121CONFIG_NLS_ISO8859_2=y
122CONFIG_NLS_ISO8859_3=y
123CONFIG_NLS_ISO8859_4=y
124CONFIG_NLS_ISO8859_5=y
125CONFIG_NLS_ISO8859_6=y
126CONFIG_NLS_ISO8859_7=y
127CONFIG_NLS_ISO8859_9=y
128CONFIG_NLS_ISO8859_13=y
129CONFIG_NLS_ISO8859_14=y
130CONFIG_NLS_ISO8859_15=y
131CONFIG_NLS_KOI8_R=y
132CONFIG_NLS_KOI8_U=y
133CONFIG_NLS_UTF8=y
134# CONFIG_ENABLE_WARN_DEPRECATED is not set
135# CONFIG_ENABLE_MUST_CHECK is not set
136# CONFIG_ARM_UNWIND is not set
137CONFIG_CRYPTO=y
138CONFIG_CRYPTO_ANSI_CPRNG=y
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
index 7d56e86c75e0..285dbbd4ad2c 100644
--- a/arch/arm/mach-shmobile/Kconfig
+++ b/arch/arm/mach-shmobile/Kconfig
@@ -61,6 +61,10 @@ endchoice
61config MACH_AG5EVM 61config MACH_AG5EVM
62 bool "AG5EVM board" 62 bool "AG5EVM board"
63 depends on ARCH_SH73A0 63 depends on ARCH_SH73A0
64
65config MACH_MACKEREL
66 bool "mackerel board"
67 depends on ARCH_SH7372
64 select ARCH_REQUIRE_GPIOLIB 68 select ARCH_REQUIRE_GPIOLIB
65 69
66comment "SH-Mobile System Configuration" 70comment "SH-Mobile System Configuration"
@@ -70,9 +74,8 @@ menu "Memory configuration"
70config MEMORY_START 74config MEMORY_START
71 hex "Physical memory start address" 75 hex "Physical memory start address"
72 default "0x50000000" if MACH_G3EVM 76 default "0x50000000" if MACH_G3EVM
73 default "0x40000000" if MACH_G4EVM 77 default "0x40000000" if MACH_G4EVM || MACH_AP4EVB || MACH_AG5EVM || \
74 default "0x40000000" if MACH_AP4EVB 78 MACH_MACKEREL
75 default "0x40000000" if MACH_AG5EVM
76 default "0x00000000" 79 default "0x00000000"
77 ---help--- 80 ---help---
78 Tweak this only when porting to a new machine which does not 81 Tweak this only when porting to a new machine which does not
diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
index efd89136f0d7..2d8328d5dd57 100644
--- a/arch/arm/mach-shmobile/Makefile
+++ b/arch/arm/mach-shmobile/Makefile
@@ -23,3 +23,4 @@ obj-$(CONFIG_MACH_G3EVM) += board-g3evm.o
23obj-$(CONFIG_MACH_G4EVM) += board-g4evm.o 23obj-$(CONFIG_MACH_G4EVM) += board-g4evm.o
24obj-$(CONFIG_MACH_AP4EVB) += board-ap4evb.o 24obj-$(CONFIG_MACH_AP4EVB) += board-ap4evb.o
25obj-$(CONFIG_MACH_AG5EVM) += board-ag5evm.o 25obj-$(CONFIG_MACH_AG5EVM) += board-ag5evm.o
26obj-$(CONFIG_MACH_MACKEREL) += board-mackerel.o
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
new file mode 100644
index 000000000000..f9418e72900b
--- /dev/null
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -0,0 +1,418 @@
1/*
2 * mackerel board support
3 *
4 * Copyright (C) 2010 Renesas Solutions Corp.
5 * Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
6 *
7 * based on ap4evb
8 * Copyright (C) 2010 Magnus Damm
9 * Copyright (C) 2008 Yoshihiro Shimoda
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; version 2 of the License.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23 */
24#include <linux/kernel.h>
25#include <linux/init.h>
26#include <linux/interrupt.h>
27#include <linux/irq.h>
28#include <linux/platform_device.h>
29#include <linux/gpio.h>
30#include <linux/input.h>
31#include <linux/io.h>
32#include <linux/mtd/mtd.h>
33#include <linux/mtd/partitions.h>
34#include <linux/mtd/physmap.h>
35#include <linux/smsc911x.h>
36#include <linux/usb/r8a66597.h>
37
38#include <video/sh_mobile_lcdc.h>
39
40#include <mach/common.h>
41#include <mach/sh7372.h>
42
43#include <asm/mach/arch.h>
44#include <asm/mach/time.h>
45#include <asm/mach/map.h>
46#include <asm/mach-types.h>
47
48/*
49 * Address Interface BusWidth note
50 * ------------------------------------------------------------------
51 * 0x0000_0000 NOR Flash ROM (MCP) 16bit SW7 : bit1 = ON
52 * 0x0800_0000 user area -
53 * 0x1000_0000 NOR Flash ROM (MCP) 16bit SW7 : bit1 = OFF
54 * 0x1400_0000 Ether (LAN9220) 16bit
55 * 0x1600_0000 user area - cannot use with NAND
56 * 0x1800_0000 user area -
57 * 0x1A00_0000 -
58 * 0x4000_0000 LPDDR2-SDRAM (POP) 32bit
59 */
60
61/*
62 * CPU mode
63 *
64 * SW4 | Boot Area| Master | Remarks
65 * 1 | 2 | 3 | 4 | 5 | 6 | 8 | | Processor|
66 * ----+-----+-----+-----+-----+-----+-----+----------+----------+--------------
67 * ON | ON | OFF | ON | ON | OFF | OFF | External | System | External ROM
68 * ON | ON | ON | ON | ON | OFF | OFF | External | System | ROM Debug
69 * ON | ON | X | ON | OFF | OFF | OFF | Built-in | System | ROM Debug
70 * X | OFF | X | X | X | X | OFF | Built-in | System | MaskROM
71 * OFF | X | X | X | X | X | OFF | Built-in | System | MaskROM
72 * X | X | X | OFF | X | X | OFF | Built-in | System | MaskROM
73 * OFF | ON | OFF | X | X | OFF | ON | External | System | Standalone
74 * ON | OFF | OFF | X | X | OFF | ON | External | Realtime | Standalone
75*/
76
77/*
78 * NOR Flash ROM
79 *
80 * SW1 | SW2 | SW7 | NOR Flash ROM
81 * bit1 | bit1 bit2 | bit1 | Memory allocation
82 * ------+------------+------+------------------
83 * OFF | ON OFF | ON | Area 0
84 * OFF | ON OFF | OFF | Area 4
85 */
86
87/*
88 * SMSC 9220
89 *
90 * SW1 SMSC 9220
91 * -----------------------
92 * ON access disable
93 * OFF access enable
94 */
95
96/*
97 * NAND Flash ROM
98 *
99 * SW1 | SW2 | SW7 | NAND Flash ROM
100 * bit1 | bit1 bit2 | bit2 | Memory allocation
101 * ------+------------+------+------------------
102 * OFF | ON OFF | ON | FCE 0
103 * OFF | ON OFF | OFF | FCE 1
104 */
105
106/*
107 * External interrupt pin settings
108 *
109 * IRQX | pin setting | device | level
110 * ------+--------------------+--------------------+-------
111 * IRQ0 | ICR1A.IRQ0SA=0010 | SDHI2 card detect | Low
112 * IRQ6 | ICR1A.IRQ6SA=0011 | Ether(LAN9220) | High
113 * IRQ7 | ICR1A.IRQ7SA=0010 | LCD Tuch Panel | Low
114 * IRQ8 | ICR2A.IRQ8SA=0010 | MMC/SD card detect | Low
115 * IRQ9 | ICR2A.IRQ9SA=0010 | KEY(TCA6408) | Low
116 * IRQ21 | ICR4A.IRQ21SA=0011 | Sensor(ADXL345) | High
117 * IRQ22 | ICR4A.IRQ22SA=0011 | Sensor(AK8975) | High
118 */
119
120/*
121 * USB
122 *
123 * USB0 : CN22 : Function
124 * USB1 : CN31 : Function/Host *1
125 *
126 * J30 (for CN31) *1
127 * ----------+---------------+-------------
128 * 1-2 short | VBUS 5V | Host
129 * open | external VBUS | Function
130 *
131 * *1
132 * CN31 is used as Host in Linux.
133 */
134
135/* MTD */
136static struct mtd_partition nor_flash_partitions[] = {
137 {
138 .name = "loader",
139 .offset = 0x00000000,
140 .size = 512 * 1024,
141 .mask_flags = MTD_WRITEABLE,
142 },
143 {
144 .name = "bootenv",
145 .offset = MTDPART_OFS_APPEND,
146 .size = 512 * 1024,
147 .mask_flags = MTD_WRITEABLE,
148 },
149 {
150 .name = "kernel_ro",
151 .offset = MTDPART_OFS_APPEND,
152 .size = 8 * 1024 * 1024,
153 .mask_flags = MTD_WRITEABLE,
154 },
155 {
156 .name = "kernel",
157 .offset = MTDPART_OFS_APPEND,
158 .size = 8 * 1024 * 1024,
159 },
160 {
161 .name = "data",
162 .offset = MTDPART_OFS_APPEND,
163 .size = MTDPART_SIZ_FULL,
164 },
165};
166
167static struct physmap_flash_data nor_flash_data = {
168 .width = 2,
169 .parts = nor_flash_partitions,
170 .nr_parts = ARRAY_SIZE(nor_flash_partitions),
171};
172
173static struct resource nor_flash_resources[] = {
174 [0] = {
175 .start = 0x00000000,
176 .end = 0x08000000 - 1,
177 .flags = IORESOURCE_MEM,
178 }
179};
180
181static struct platform_device nor_flash_device = {
182 .name = "physmap-flash",
183 .dev = {
184 .platform_data = &nor_flash_data,
185 },
186 .num_resources = ARRAY_SIZE(nor_flash_resources),
187 .resource = nor_flash_resources,
188};
189
190/* SMSC */
191static struct resource smc911x_resources[] = {
192 {
193 .start = 0x14000000,
194 .end = 0x16000000 - 1,
195 .flags = IORESOURCE_MEM,
196 }, {
197 .start = evt2irq(0x02c0) /* IRQ6A */,
198 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
199 },
200};
201
202static struct smsc911x_platform_config smsc911x_info = {
203 .flags = SMSC911X_USE_16BIT | SMSC911X_SAVE_MAC_ADDRESS,
204 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
205 .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL,
206};
207
208static struct platform_device smc911x_device = {
209 .name = "smsc911x",
210 .id = -1,
211 .num_resources = ARRAY_SIZE(smc911x_resources),
212 .resource = smc911x_resources,
213 .dev = {
214 .platform_data = &smsc911x_info,
215 },
216};
217
218/* LCDC */
219static struct fb_videomode mackerel_lcdc_modes[] = {
220 {
221 .name = "WVGA Panel",
222 .xres = 800,
223 .yres = 480,
224 .left_margin = 220,
225 .right_margin = 110,
226 .hsync_len = 70,
227 .upper_margin = 20,
228 .lower_margin = 5,
229 .vsync_len = 5,
230 .sync = 0,
231 },
232};
233
234static struct sh_mobile_lcdc_info lcdc_info = {
235 .clock_source = LCDC_CLK_BUS,
236 .ch[0] = {
237 .chan = LCDC_CHAN_MAINLCD,
238 .bpp = 16,
239 .lcd_cfg = mackerel_lcdc_modes,
240 .num_cfg = ARRAY_SIZE(mackerel_lcdc_modes),
241 .interface_type = RGB24,
242 .clock_divider = 2,
243 .flags = 0,
244 .lcd_size_cfg.width = 152,
245 .lcd_size_cfg.height = 91,
246 }
247};
248
249static struct resource lcdc_resources[] = {
250 [0] = {
251 .name = "LCDC",
252 .start = 0xfe940000,
253 .end = 0xfe943fff,
254 .flags = IORESOURCE_MEM,
255 },
256 [1] = {
257 .start = intcs_evt2irq(0x580),
258 .flags = IORESOURCE_IRQ,
259 },
260};
261
262static struct platform_device lcdc_device = {
263 .name = "sh_mobile_lcdc_fb",
264 .num_resources = ARRAY_SIZE(lcdc_resources),
265 .resource = lcdc_resources,
266 .dev = {
267 .platform_data = &lcdc_info,
268 .coherent_dma_mask = ~0,
269 },
270};
271
272/* USB1 (Host) */
273static void usb1_host_port_power(int port, int power)
274{
275 if (!power) /* only power-on is supported for now */
276 return;
277
278 /* set VBOUT/PWEN and EXTLP1 in DVSTCTR */
279 __raw_writew(__raw_readw(0xE68B0008) | 0x600, 0xE68B0008);
280}
281
282static struct r8a66597_platdata usb1_host_data = {
283 .on_chip = 1,
284 .port_power = usb1_host_port_power,
285};
286
287static struct resource usb1_host_resources[] = {
288 [0] = {
289 .name = "USBHS",
290 .start = 0xE68B0000,
291 .end = 0xE68B00E6 - 1,
292 .flags = IORESOURCE_MEM,
293 },
294 [1] = {
295 .start = evt2irq(0x1ce0) /* USB1_USB1I0 */,
296 .flags = IORESOURCE_IRQ,
297 },
298};
299
300static struct platform_device usb1_host_device = {
301 .name = "r8a66597_hcd",
302 .id = 1,
303 .dev = {
304 .dma_mask = NULL, /* not use dma */
305 .coherent_dma_mask = 0xffffffff,
306 .platform_data = &usb1_host_data,
307 },
308 .num_resources = ARRAY_SIZE(usb1_host_resources),
309 .resource = usb1_host_resources,
310};
311
312static struct platform_device *mackerel_devices[] __initdata = {
313 &nor_flash_device,
314 &smc911x_device,
315 &lcdc_device,
316 &usb1_host_device,
317};
318
319static struct map_desc mackerel_io_desc[] __initdata = {
320 /* create a 1:1 entity map for 0xe6xxxxxx
321 * used by CPGA, INTC and PFC.
322 */
323 {
324 .virtual = 0xe6000000,
325 .pfn = __phys_to_pfn(0xe6000000),
326 .length = 256 << 20,
327 .type = MT_DEVICE_NONSHARED
328 },
329};
330
331static void __init mackerel_map_io(void)
332{
333 iotable_init(mackerel_io_desc, ARRAY_SIZE(mackerel_io_desc));
334
335 /* setup early devices and console here as well */
336 sh7372_add_early_devices();
337 shmobile_setup_console();
338}
339
340static void __init mackerel_init(void)
341{
342 sh7372_pinmux_init();
343
344 /* enable SCIFA0 */
345 gpio_request(GPIO_FN_SCIFA0_TXD, NULL);
346 gpio_request(GPIO_FN_SCIFA0_RXD, NULL);
347
348 /* enable SMSC911X */
349 gpio_request(GPIO_FN_CS5A, NULL);
350 gpio_request(GPIO_FN_IRQ6_39, NULL);
351
352 /* LCDC */
353 gpio_request(GPIO_FN_LCDD23, NULL);
354 gpio_request(GPIO_FN_LCDD22, NULL);
355 gpio_request(GPIO_FN_LCDD21, NULL);
356 gpio_request(GPIO_FN_LCDD20, NULL);
357 gpio_request(GPIO_FN_LCDD19, NULL);
358 gpio_request(GPIO_FN_LCDD18, NULL);
359 gpio_request(GPIO_FN_LCDD17, NULL);
360 gpio_request(GPIO_FN_LCDD16, NULL);
361 gpio_request(GPIO_FN_LCDD15, NULL);
362 gpio_request(GPIO_FN_LCDD14, NULL);
363 gpio_request(GPIO_FN_LCDD13, NULL);
364 gpio_request(GPIO_FN_LCDD12, NULL);
365 gpio_request(GPIO_FN_LCDD11, NULL);
366 gpio_request(GPIO_FN_LCDD10, NULL);
367 gpio_request(GPIO_FN_LCDD9, NULL);
368 gpio_request(GPIO_FN_LCDD8, NULL);
369 gpio_request(GPIO_FN_LCDD7, NULL);
370 gpio_request(GPIO_FN_LCDD6, NULL);
371 gpio_request(GPIO_FN_LCDD5, NULL);
372 gpio_request(GPIO_FN_LCDD4, NULL);
373 gpio_request(GPIO_FN_LCDD3, NULL);
374 gpio_request(GPIO_FN_LCDD2, NULL);
375 gpio_request(GPIO_FN_LCDD1, NULL);
376 gpio_request(GPIO_FN_LCDD0, NULL);
377 gpio_request(GPIO_FN_LCDDISP, NULL);
378 gpio_request(GPIO_FN_LCDDCK, NULL);
379
380 gpio_request(GPIO_PORT31, NULL); /* backlight */
381 gpio_direction_output(GPIO_PORT31, 1);
382
383 gpio_request(GPIO_PORT151, NULL); /* LCDDON */
384 gpio_direction_output(GPIO_PORT151, 1);
385
386 /* USB enable */
387 gpio_request(GPIO_FN_VBUS0_1, NULL);
388 gpio_request(GPIO_FN_IDIN_1_18, NULL);
389 gpio_request(GPIO_FN_PWEN_1_115, NULL);
390 gpio_request(GPIO_FN_OVCN_1_114, NULL);
391 gpio_request(GPIO_FN_EXTLP_1, NULL);
392 gpio_request(GPIO_FN_OVCN2_1, NULL);
393
394 /* setup USB phy */
395 __raw_writew(0x8a0a, 0xE6058130); /* USBCR2 */
396
397
398 sh7372_add_standard_devices();
399
400 platform_add_devices(mackerel_devices, ARRAY_SIZE(mackerel_devices));
401}
402
403static void __init mackerel_timer_init(void)
404{
405 sh7372_clock_init();
406 shmobile_timer.init();
407}
408
409static struct sys_timer mackerel_timer = {
410 .init = mackerel_timer_init,
411};
412
413MACHINE_START(MACKEREL, "mackerel")
414 .map_io = mackerel_map_io,
415 .init_irq = sh7372_init_irq,
416 .init_machine = mackerel_init,
417 .timer = &mackerel_timer,
418MACHINE_END