diff options
Diffstat (limited to 'arch/arm/plat-s3c')
-rw-r--r-- | arch/arm/plat-s3c/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/plat-s3c/dev-audio.c | 68 | ||||
-rw-r--r-- | arch/arm/plat-s3c/gpio-config.c | 2 | ||||
-rw-r--r-- | arch/arm/plat-s3c/include/plat/devs.h | 6 | ||||
-rw-r--r-- | arch/arm/plat-s3c/include/plat/nand.h | 31 |
5 files changed, 94 insertions, 14 deletions
diff --git a/arch/arm/plat-s3c/Makefile b/arch/arm/plat-s3c/Makefile index 610651455a78..0761766b1833 100644 --- a/arch/arm/plat-s3c/Makefile +++ b/arch/arm/plat-s3c/Makefile | |||
@@ -34,6 +34,7 @@ obj-$(CONFIG_S3C_DEV_HSMMC) += dev-hsmmc.o | |||
34 | obj-$(CONFIG_S3C_DEV_HSMMC1) += dev-hsmmc1.o | 34 | obj-$(CONFIG_S3C_DEV_HSMMC1) += dev-hsmmc1.o |
35 | obj-y += dev-i2c0.o | 35 | obj-y += dev-i2c0.o |
36 | obj-$(CONFIG_S3C_DEV_I2C1) += dev-i2c1.o | 36 | obj-$(CONFIG_S3C_DEV_I2C1) += dev-i2c1.o |
37 | obj-$(CONFIG_SND_S3C64XX_SOC_I2S) += dev-audio.o | ||
37 | obj-$(CONFIG_S3C_DEV_FB) += dev-fb.o | 38 | obj-$(CONFIG_S3C_DEV_FB) += dev-fb.o |
38 | obj-$(CONFIG_S3C_DEV_USB_HOST) += dev-usb.o | 39 | obj-$(CONFIG_S3C_DEV_USB_HOST) += dev-usb.o |
39 | obj-$(CONFIG_S3C_DEV_USB_HSOTG) += dev-usb-hsotg.o | 40 | obj-$(CONFIG_S3C_DEV_USB_HSOTG) += dev-usb-hsotg.o |
diff --git a/arch/arm/plat-s3c/dev-audio.c b/arch/arm/plat-s3c/dev-audio.c new file mode 100644 index 000000000000..1322beb40dd7 --- /dev/null +++ b/arch/arm/plat-s3c/dev-audio.c | |||
@@ -0,0 +1,68 @@ | |||
1 | /* linux/arch/arm/plat-s3c/dev-audio.c | ||
2 | * | ||
3 | * Copyright 2009 Wolfson Microelectronics | ||
4 | * Mark Brown <broonie@opensource.wolfsonmicro.com> | ||
5 | * | ||
6 | |||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/string.h> | ||
14 | #include <linux/platform_device.h> | ||
15 | |||
16 | #include <mach/irqs.h> | ||
17 | #include <mach/map.h> | ||
18 | |||
19 | #include <plat/devs.h> | ||
20 | |||
21 | |||
22 | static struct resource s3c64xx_iis0_resource[] = { | ||
23 | [0] = { | ||
24 | .start = S3C64XX_PA_IIS0, | ||
25 | .end = S3C64XX_PA_IIS0 + 0x100 - 1, | ||
26 | .flags = IORESOURCE_MEM, | ||
27 | }, | ||
28 | }; | ||
29 | |||
30 | struct platform_device s3c64xx_device_iis0 = { | ||
31 | .name = "s3c64xx-iis", | ||
32 | .id = 0, | ||
33 | .num_resources = ARRAY_SIZE(s3c64xx_iis0_resource), | ||
34 | .resource = s3c64xx_iis0_resource, | ||
35 | }; | ||
36 | EXPORT_SYMBOL(s3c64xx_device_iis0); | ||
37 | |||
38 | static struct resource s3c64xx_iis1_resource[] = { | ||
39 | [0] = { | ||
40 | .start = S3C64XX_PA_IIS1, | ||
41 | .end = S3C64XX_PA_IIS1 + 0x100 - 1, | ||
42 | .flags = IORESOURCE_MEM, | ||
43 | }, | ||
44 | }; | ||
45 | |||
46 | struct platform_device s3c64xx_device_iis1 = { | ||
47 | .name = "s3c64xx-iis", | ||
48 | .id = 1, | ||
49 | .num_resources = ARRAY_SIZE(s3c64xx_iis1_resource), | ||
50 | .resource = s3c64xx_iis1_resource, | ||
51 | }; | ||
52 | EXPORT_SYMBOL(s3c64xx_device_iis1); | ||
53 | |||
54 | static struct resource s3c64xx_iisv4_resource[] = { | ||
55 | [0] = { | ||
56 | .start = S3C64XX_PA_IISV4, | ||
57 | .end = S3C64XX_PA_IISV4 + 0x100 - 1, | ||
58 | .flags = IORESOURCE_MEM, | ||
59 | }, | ||
60 | }; | ||
61 | |||
62 | struct platform_device s3c64xx_device_iisv4 = { | ||
63 | .name = "s3c64xx-iis-v4", | ||
64 | .id = -1, | ||
65 | .num_resources = ARRAY_SIZE(s3c64xx_iisv4_resource), | ||
66 | .resource = s3c64xx_iisv4_resource, | ||
67 | }; | ||
68 | EXPORT_SYMBOL(s3c64xx_device_iisv4); | ||
diff --git a/arch/arm/plat-s3c/gpio-config.c b/arch/arm/plat-s3c/gpio-config.c index 08044dec9731..456969b6fa0d 100644 --- a/arch/arm/plat-s3c/gpio-config.c +++ b/arch/arm/plat-s3c/gpio-config.c | |||
@@ -119,7 +119,7 @@ int s3c_gpio_setcfg_s3c64xx_4bit(struct s3c_gpio_chip *chip, | |||
119 | unsigned int shift = (off & 7) * 4; | 119 | unsigned int shift = (off & 7) * 4; |
120 | u32 con; | 120 | u32 con; |
121 | 121 | ||
122 | if (off < 8 && chip->chip.ngpio >= 8) | 122 | if (off < 8 && chip->chip.ngpio > 8) |
123 | reg -= 4; | 123 | reg -= 4; |
124 | 124 | ||
125 | if (s3c_gpio_is_cfg_special(cfg)) { | 125 | if (s3c_gpio_is_cfg_special(cfg)) { |
diff --git a/arch/arm/plat-s3c/include/plat/devs.h b/arch/arm/plat-s3c/include/plat/devs.h index a0b6768fddcf..2e170827e0b0 100644 --- a/arch/arm/plat-s3c/include/plat/devs.h +++ b/arch/arm/plat-s3c/include/plat/devs.h | |||
@@ -24,16 +24,20 @@ extern struct platform_device *s3c24xx_uart_src[]; | |||
24 | 24 | ||
25 | extern struct platform_device s3c_device_timer[]; | 25 | extern struct platform_device s3c_device_timer[]; |
26 | 26 | ||
27 | extern struct platform_device s3c64xx_device_iis0; | ||
28 | extern struct platform_device s3c64xx_device_iis1; | ||
29 | extern struct platform_device s3c64xx_device_iisv4; | ||
30 | |||
27 | extern struct platform_device s3c_device_fb; | 31 | extern struct platform_device s3c_device_fb; |
28 | extern struct platform_device s3c_device_usb; | 32 | extern struct platform_device s3c_device_usb; |
29 | extern struct platform_device s3c_device_lcd; | 33 | extern struct platform_device s3c_device_lcd; |
30 | extern struct platform_device s3c_device_wdt; | 34 | extern struct platform_device s3c_device_wdt; |
31 | extern struct platform_device s3c_device_i2c0; | 35 | extern struct platform_device s3c_device_i2c0; |
32 | extern struct platform_device s3c_device_i2c1; | 36 | extern struct platform_device s3c_device_i2c1; |
33 | extern struct platform_device s3c_device_iis; | ||
34 | extern struct platform_device s3c_device_rtc; | 37 | extern struct platform_device s3c_device_rtc; |
35 | extern struct platform_device s3c_device_adc; | 38 | extern struct platform_device s3c_device_adc; |
36 | extern struct platform_device s3c_device_sdi; | 39 | extern struct platform_device s3c_device_sdi; |
40 | extern struct platform_device s3c_device_iis; | ||
37 | extern struct platform_device s3c_device_hwmon; | 41 | extern struct platform_device s3c_device_hwmon; |
38 | extern struct platform_device s3c_device_hsmmc0; | 42 | extern struct platform_device s3c_device_hsmmc0; |
39 | extern struct platform_device s3c_device_hsmmc1; | 43 | extern struct platform_device s3c_device_hsmmc1; |
diff --git a/arch/arm/plat-s3c/include/plat/nand.h b/arch/arm/plat-s3c/include/plat/nand.h index f4dcd14af059..18f958801e64 100644 --- a/arch/arm/plat-s3c/include/plat/nand.h +++ b/arch/arm/plat-s3c/include/plat/nand.h | |||
@@ -10,19 +10,26 @@ | |||
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | /* struct s3c2410_nand_set | 13 | /** |
14 | * struct s3c2410_nand_set - define a set of one or more nand chips | ||
15 | * @disable_ecc: Entirely disable ECC - Dangerous | ||
16 | * @flash_bbt: Openmoko u-boot can create a Bad Block Table | ||
17 | * Setting this flag will allow the kernel to | ||
18 | * look for it at boot time and also skip the NAND | ||
19 | * scan. | ||
20 | * @nr_chips: Number of chips in this set | ||
21 | * @nr_partitions: Number of partitions pointed to by @partitions | ||
22 | * @name: Name of set (optional) | ||
23 | * @nr_map: Map for low-layer logical to physical chip numbers (option) | ||
24 | * @partitions: The mtd partition list | ||
14 | * | 25 | * |
15 | * define an set of one or more nand chips registered with an unique mtd | 26 | * define a set of one or more nand chips registered with an unique mtd. Also |
16 | * | 27 | * allows to pass flag to the underlying NAND layer. 'disable_ecc' will trigger |
17 | * nr_chips = number of chips in this set | 28 | * a warning at boot time. |
18 | * nr_partitions = number of partitions pointed to be partitoons (or zero) | 29 | */ |
19 | * name = name of set (optional) | ||
20 | * nr_map = map for low-layer logical to physical chip numbers (option) | ||
21 | * partitions = mtd partition list | ||
22 | */ | ||
23 | |||
24 | struct s3c2410_nand_set { | 30 | struct s3c2410_nand_set { |
25 | unsigned int disable_ecc : 1; | 31 | unsigned int disable_ecc:1; |
32 | unsigned int flash_bbt:1; | ||
26 | 33 | ||
27 | int nr_chips; | 34 | int nr_chips; |
28 | int nr_partitions; | 35 | int nr_partitions; |
@@ -39,7 +46,7 @@ struct s3c2410_platform_nand { | |||
39 | int twrph0; /* active time for nWE/nOE */ | 46 | int twrph0; /* active time for nWE/nOE */ |
40 | int twrph1; /* time for release CLE/ALE from nWE/nOE inactive */ | 47 | int twrph1; /* time for release CLE/ALE from nWE/nOE inactive */ |
41 | 48 | ||
42 | unsigned int ignore_unset_ecc : 1; | 49 | unsigned int ignore_unset_ecc:1; |
43 | 50 | ||
44 | int nr_sets; | 51 | int nr_sets; |
45 | struct s3c2410_nand_set *sets; | 52 | struct s3c2410_nand_set *sets; |