diff options
Diffstat (limited to 'arch/arm/plat-s5p')
-rw-r--r-- | arch/arm/plat-s5p/Kconfig | 13 | ||||
-rw-r--r-- | arch/arm/plat-s5p/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/plat-s5p/dev-i2c-hdmiphy.c | 59 | ||||
-rw-r--r-- | arch/arm/plat-s5p/dev-tv.c | 98 | ||||
-rw-r--r-- | arch/arm/plat-s5p/include/plat/pll.h | 14 | ||||
-rw-r--r-- | arch/arm/plat-s5p/irq-gpioint.c | 10 |
6 files changed, 186 insertions, 10 deletions
diff --git a/arch/arm/plat-s5p/Kconfig b/arch/arm/plat-s5p/Kconfig index 9843c954c04..f9241a7a68c 100644 --- a/arch/arm/plat-s5p/Kconfig +++ b/arch/arm/plat-s5p/Kconfig | |||
@@ -16,9 +16,6 @@ config PLAT_S5P | |||
16 | select S3C_GPIO_TRACK | 16 | select S3C_GPIO_TRACK |
17 | select S5P_GPIO_DRVSTR | 17 | select S5P_GPIO_DRVSTR |
18 | select SAMSUNG_GPIOLIB_4BIT | 18 | select SAMSUNG_GPIOLIB_4BIT |
19 | select S3C_GPIO_CFG_S3C64XX | ||
20 | select S3C_GPIO_PULL_UPDOWN | ||
21 | select S3C_GPIO_CFG_S3C24XX | ||
22 | select PLAT_SAMSUNG | 19 | select PLAT_SAMSUNG |
23 | select SAMSUNG_CLKSRC | 20 | select SAMSUNG_CLKSRC |
24 | select SAMSUNG_IRQ_VIC_TIMER | 21 | select SAMSUNG_IRQ_VIC_TIMER |
@@ -76,6 +73,11 @@ config S5P_DEV_FIMD0 | |||
76 | help | 73 | help |
77 | Compile in platform device definitions for FIMD controller 0 | 74 | Compile in platform device definitions for FIMD controller 0 |
78 | 75 | ||
76 | config S5P_DEV_I2C_HDMIPHY | ||
77 | bool | ||
78 | help | ||
79 | Compile in platform device definitions for I2C HDMIPHY controller | ||
80 | |||
79 | config S5P_DEV_MFC | 81 | config S5P_DEV_MFC |
80 | bool | 82 | bool |
81 | help | 83 | help |
@@ -96,6 +98,11 @@ config S5P_DEV_CSIS1 | |||
96 | help | 98 | help |
97 | Compile in platform device definitions for MIPI-CSIS channel 1 | 99 | Compile in platform device definitions for MIPI-CSIS channel 1 |
98 | 100 | ||
101 | config S5P_DEV_TV | ||
102 | bool | ||
103 | help | ||
104 | Compile in platform device definition for TV interface | ||
105 | |||
99 | config S5P_DEV_USB_EHCI | 106 | config S5P_DEV_USB_EHCI |
100 | bool | 107 | bool |
101 | help | 108 | help |
diff --git a/arch/arm/plat-s5p/Makefile b/arch/arm/plat-s5p/Makefile index 4b53e04eeca..181201974b4 100644 --- a/arch/arm/plat-s5p/Makefile +++ b/arch/arm/plat-s5p/Makefile | |||
@@ -31,8 +31,10 @@ obj-$(CONFIG_S5P_DEV_FIMC1) += dev-fimc1.o | |||
31 | obj-$(CONFIG_S5P_DEV_FIMC2) += dev-fimc2.o | 31 | obj-$(CONFIG_S5P_DEV_FIMC2) += dev-fimc2.o |
32 | obj-$(CONFIG_S5P_DEV_FIMC3) += dev-fimc3.o | 32 | obj-$(CONFIG_S5P_DEV_FIMC3) += dev-fimc3.o |
33 | obj-$(CONFIG_S5P_DEV_FIMD0) += dev-fimd0.o | 33 | obj-$(CONFIG_S5P_DEV_FIMD0) += dev-fimd0.o |
34 | obj-$(CONFIG_S5P_DEV_I2C_HDMIPHY) += dev-i2c-hdmiphy.o | ||
34 | obj-$(CONFIG_S5P_DEV_ONENAND) += dev-onenand.o | 35 | obj-$(CONFIG_S5P_DEV_ONENAND) += dev-onenand.o |
35 | obj-$(CONFIG_S5P_DEV_CSIS0) += dev-csis0.o | 36 | obj-$(CONFIG_S5P_DEV_CSIS0) += dev-csis0.o |
36 | obj-$(CONFIG_S5P_DEV_CSIS1) += dev-csis1.o | 37 | obj-$(CONFIG_S5P_DEV_CSIS1) += dev-csis1.o |
38 | obj-$(CONFIG_S5P_DEV_TV) += dev-tv.o | ||
37 | obj-$(CONFIG_S5P_DEV_USB_EHCI) += dev-ehci.o | 39 | obj-$(CONFIG_S5P_DEV_USB_EHCI) += dev-ehci.o |
38 | obj-$(CONFIG_S5P_SETUP_MIPIPHY) += setup-mipiphy.o | 40 | obj-$(CONFIG_S5P_SETUP_MIPIPHY) += setup-mipiphy.o |
diff --git a/arch/arm/plat-s5p/dev-i2c-hdmiphy.c b/arch/arm/plat-s5p/dev-i2c-hdmiphy.c new file mode 100644 index 00000000000..37343f1999f --- /dev/null +++ b/arch/arm/plat-s5p/dev-i2c-hdmiphy.c | |||
@@ -0,0 +1,59 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2011 Samsung Electronics Co., Ltd. | ||
3 | * http://www.samsung.com/ | ||
4 | * | ||
5 | * S5P series device definition for i2c for hdmiphy device | ||
6 | * | ||
7 | * Based on plat-samsung/dev-i2c7.c | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #include <linux/gfp.h> | ||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/string.h> | ||
17 | #include <linux/platform_device.h> | ||
18 | |||
19 | #include <mach/irqs.h> | ||
20 | #include <mach/map.h> | ||
21 | #include <mach/i2c-hdmiphy.h> | ||
22 | |||
23 | #include <plat/regs-iic.h> | ||
24 | #include <plat/devs.h> | ||
25 | #include <plat/cpu.h> | ||
26 | #include <plat/iic.h> | ||
27 | |||
28 | static struct resource s5p_i2c_resource[] = { | ||
29 | [0] = { | ||
30 | .start = S5P_PA_IIC_HDMIPHY, | ||
31 | .end = S5P_PA_IIC_HDMIPHY + SZ_4K - 1, | ||
32 | .flags = IORESOURCE_MEM, | ||
33 | }, | ||
34 | [1] = { | ||
35 | .start = IRQ_IIC_HDMIPHY, | ||
36 | .end = IRQ_IIC_HDMIPHY, | ||
37 | .flags = IORESOURCE_IRQ, | ||
38 | }, | ||
39 | }; | ||
40 | |||
41 | struct platform_device s5p_device_i2c_hdmiphy = { | ||
42 | .name = "s3c2440-hdmiphy-i2c", | ||
43 | .id = -1, | ||
44 | .num_resources = ARRAY_SIZE(s5p_i2c_resource), | ||
45 | .resource = s5p_i2c_resource, | ||
46 | }; | ||
47 | |||
48 | void __init s5p_i2c_hdmiphy_set_platdata(struct s3c2410_platform_i2c *pd) | ||
49 | { | ||
50 | struct s3c2410_platform_i2c *npd; | ||
51 | |||
52 | if (!pd) { | ||
53 | pd = &default_i2c_data; | ||
54 | pd->bus_num = S5P_I2C_HDMIPHY_BUS_NUM; | ||
55 | } | ||
56 | |||
57 | npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c), | ||
58 | &s5p_device_i2c_hdmiphy); | ||
59 | } | ||
diff --git a/arch/arm/plat-s5p/dev-tv.c b/arch/arm/plat-s5p/dev-tv.c new file mode 100644 index 00000000000..361a1b63a81 --- /dev/null +++ b/arch/arm/plat-s5p/dev-tv.c | |||
@@ -0,0 +1,98 @@ | |||
1 | /* linux/arch/arm/plat-s5p/dev-tv.c | ||
2 | * | ||
3 | * Copyright (C) 2011 Samsung Electronics Co.Ltd | ||
4 | * Author: Tomasz Stanislawski <t.stanislaws@samsung.com> | ||
5 | * | ||
6 | * S5P series device definition for TV device | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include <linux/dma-mapping.h> | ||
14 | |||
15 | #include <mach/irqs.h> | ||
16 | #include <mach/map.h> | ||
17 | |||
18 | #include <plat/devs.h> | ||
19 | |||
20 | /* HDMI interface */ | ||
21 | static struct resource s5p_hdmi_resources[] = { | ||
22 | [0] = { | ||
23 | .start = S5P_PA_HDMI, | ||
24 | .end = S5P_PA_HDMI + SZ_1M - 1, | ||
25 | .flags = IORESOURCE_MEM, | ||
26 | }, | ||
27 | [1] = { | ||
28 | .start = IRQ_HDMI, | ||
29 | .end = IRQ_HDMI, | ||
30 | .flags = IORESOURCE_IRQ, | ||
31 | }, | ||
32 | }; | ||
33 | |||
34 | struct platform_device s5p_device_hdmi = { | ||
35 | .name = "s5p-hdmi", | ||
36 | .id = -1, | ||
37 | .num_resources = ARRAY_SIZE(s5p_hdmi_resources), | ||
38 | .resource = s5p_hdmi_resources, | ||
39 | }; | ||
40 | EXPORT_SYMBOL(s5p_device_hdmi); | ||
41 | |||
42 | /* SDO interface */ | ||
43 | static struct resource s5p_sdo_resources[] = { | ||
44 | [0] = { | ||
45 | .start = S5P_PA_SDO, | ||
46 | .end = S5P_PA_SDO + SZ_64K - 1, | ||
47 | .flags = IORESOURCE_MEM, | ||
48 | }, | ||
49 | [1] = { | ||
50 | .start = IRQ_SDO, | ||
51 | .end = IRQ_SDO, | ||
52 | .flags = IORESOURCE_IRQ, | ||
53 | } | ||
54 | }; | ||
55 | |||
56 | struct platform_device s5p_device_sdo = { | ||
57 | .name = "s5p-sdo", | ||
58 | .id = -1, | ||
59 | .num_resources = ARRAY_SIZE(s5p_sdo_resources), | ||
60 | .resource = s5p_sdo_resources, | ||
61 | }; | ||
62 | EXPORT_SYMBOL(s5p_device_sdo); | ||
63 | |||
64 | /* MIXER */ | ||
65 | static struct resource s5p_mixer_resources[] = { | ||
66 | [0] = { | ||
67 | .start = S5P_PA_MIXER, | ||
68 | .end = S5P_PA_MIXER + SZ_64K - 1, | ||
69 | .flags = IORESOURCE_MEM, | ||
70 | .name = "mxr" | ||
71 | }, | ||
72 | [1] = { | ||
73 | .start = S5P_PA_VP, | ||
74 | .end = S5P_PA_VP + SZ_64K - 1, | ||
75 | .flags = IORESOURCE_MEM, | ||
76 | .name = "vp" | ||
77 | }, | ||
78 | [2] = { | ||
79 | .start = IRQ_MIXER, | ||
80 | .end = IRQ_MIXER, | ||
81 | .flags = IORESOURCE_IRQ, | ||
82 | .name = "irq" | ||
83 | } | ||
84 | }; | ||
85 | |||
86 | static u64 s5p_tv_dmamask = DMA_BIT_MASK(32); | ||
87 | |||
88 | struct platform_device s5p_device_mixer = { | ||
89 | .name = "s5p-mixer", | ||
90 | .id = -1, | ||
91 | .num_resources = ARRAY_SIZE(s5p_mixer_resources), | ||
92 | .resource = s5p_mixer_resources, | ||
93 | .dev = { | ||
94 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
95 | .dma_mask = &s5p_tv_dmamask, | ||
96 | } | ||
97 | }; | ||
98 | EXPORT_SYMBOL(s5p_device_mixer); | ||
diff --git a/arch/arm/plat-s5p/include/plat/pll.h b/arch/arm/plat-s5p/include/plat/pll.h index 3e21b9444cc..002ec9f28f1 100644 --- a/arch/arm/plat-s5p/include/plat/pll.h +++ b/arch/arm/plat-s5p/include/plat/pll.h | |||
@@ -97,15 +97,24 @@ static inline unsigned long s5p_get_pll45xx(unsigned long baseclk, u32 pll_con, | |||
97 | return (unsigned long)fvco; | 97 | return (unsigned long)fvco; |
98 | } | 98 | } |
99 | 99 | ||
100 | #define PLL46XX_KDIV_MASK (0xFFFF) | 100 | /* CON0 bit-fields */ |
101 | #define PLL4650C_KDIV_MASK (0xFFF) | ||
102 | #define PLL46XX_MDIV_MASK (0x1FF) | 101 | #define PLL46XX_MDIV_MASK (0x1FF) |
103 | #define PLL46XX_PDIV_MASK (0x3F) | 102 | #define PLL46XX_PDIV_MASK (0x3F) |
104 | #define PLL46XX_SDIV_MASK (0x7) | 103 | #define PLL46XX_SDIV_MASK (0x7) |
104 | #define PLL46XX_LOCKED_SHIFT (29) | ||
105 | #define PLL46XX_MDIV_SHIFT (16) | 105 | #define PLL46XX_MDIV_SHIFT (16) |
106 | #define PLL46XX_PDIV_SHIFT (8) | 106 | #define PLL46XX_PDIV_SHIFT (8) |
107 | #define PLL46XX_SDIV_SHIFT (0) | 107 | #define PLL46XX_SDIV_SHIFT (0) |
108 | 108 | ||
109 | /* CON1 bit-fields */ | ||
110 | #define PLL46XX_MRR_MASK (0x1F) | ||
111 | #define PLL46XX_MFR_MASK (0x3F) | ||
112 | #define PLL46XX_KDIV_MASK (0xFFFF) | ||
113 | #define PLL4650C_KDIV_MASK (0xFFF) | ||
114 | #define PLL46XX_MRR_SHIFT (24) | ||
115 | #define PLL46XX_MFR_SHIFT (16) | ||
116 | #define PLL46XX_KDIV_SHIFT (0) | ||
117 | |||
109 | enum pll46xx_type_t { | 118 | enum pll46xx_type_t { |
110 | pll_4600, | 119 | pll_4600, |
111 | pll_4650, | 120 | pll_4650, |
@@ -148,6 +157,7 @@ static inline unsigned long s5p_get_pll46xx(unsigned long baseclk, | |||
148 | #define PLL90XX_PDIV_MASK (0x3F) | 157 | #define PLL90XX_PDIV_MASK (0x3F) |
149 | #define PLL90XX_SDIV_MASK (0x7) | 158 | #define PLL90XX_SDIV_MASK (0x7) |
150 | #define PLL90XX_KDIV_MASK (0xffff) | 159 | #define PLL90XX_KDIV_MASK (0xffff) |
160 | #define PLL90XX_LOCKED_SHIFT (29) | ||
151 | #define PLL90XX_MDIV_SHIFT (16) | 161 | #define PLL90XX_MDIV_SHIFT (16) |
152 | #define PLL90XX_PDIV_SHIFT (8) | 162 | #define PLL90XX_PDIV_SHIFT (8) |
153 | #define PLL90XX_SDIV_SHIFT (0) | 163 | #define PLL90XX_SDIV_SHIFT (0) |
diff --git a/arch/arm/plat-s5p/irq-gpioint.c b/arch/arm/plat-s5p/irq-gpioint.c index f88216d2399..a566523d34e 100644 --- a/arch/arm/plat-s5p/irq-gpioint.c +++ b/arch/arm/plat-s5p/irq-gpioint.c | |||
@@ -37,7 +37,7 @@ struct s5p_gpioint_bank { | |||
37 | int start; | 37 | int start; |
38 | int nr_groups; | 38 | int nr_groups; |
39 | int irq; | 39 | int irq; |
40 | struct s3c_gpio_chip **chips; | 40 | struct samsung_gpio_chip **chips; |
41 | void (*handler)(unsigned int, struct irq_desc *); | 41 | void (*handler)(unsigned int, struct irq_desc *); |
42 | }; | 42 | }; |
43 | 43 | ||
@@ -87,7 +87,7 @@ static void s5p_gpioint_handler(unsigned int irq, struct irq_desc *desc) | |||
87 | chained_irq_enter(chip, desc); | 87 | chained_irq_enter(chip, desc); |
88 | 88 | ||
89 | for (group = 0; group < bank->nr_groups; group++) { | 89 | for (group = 0; group < bank->nr_groups; group++) { |
90 | struct s3c_gpio_chip *chip = bank->chips[group]; | 90 | struct samsung_gpio_chip *chip = bank->chips[group]; |
91 | if (!chip) | 91 | if (!chip) |
92 | continue; | 92 | continue; |
93 | 93 | ||
@@ -110,7 +110,7 @@ static void s5p_gpioint_handler(unsigned int irq, struct irq_desc *desc) | |||
110 | chained_irq_exit(chip, desc); | 110 | chained_irq_exit(chip, desc); |
111 | } | 111 | } |
112 | 112 | ||
113 | static __init int s5p_gpioint_add(struct s3c_gpio_chip *chip) | 113 | static __init int s5p_gpioint_add(struct samsung_gpio_chip *chip) |
114 | { | 114 | { |
115 | static int used_gpioint_groups = 0; | 115 | static int used_gpioint_groups = 0; |
116 | int group = chip->group; | 116 | int group = chip->group; |
@@ -131,7 +131,7 @@ static __init int s5p_gpioint_add(struct s3c_gpio_chip *chip) | |||
131 | return -EINVAL; | 131 | return -EINVAL; |
132 | 132 | ||
133 | if (!bank->handler) { | 133 | if (!bank->handler) { |
134 | bank->chips = kzalloc(sizeof(struct s3c_gpio_chip *) * | 134 | bank->chips = kzalloc(sizeof(struct samsung_gpio_chip *) * |
135 | bank->nr_groups, GFP_KERNEL); | 135 | bank->nr_groups, GFP_KERNEL); |
136 | if (!bank->chips) | 136 | if (!bank->chips) |
137 | return -ENOMEM; | 137 | return -ENOMEM; |
@@ -174,7 +174,7 @@ static __init int s5p_gpioint_add(struct s3c_gpio_chip *chip) | |||
174 | 174 | ||
175 | int __init s5p_register_gpio_interrupt(int pin) | 175 | int __init s5p_register_gpio_interrupt(int pin) |
176 | { | 176 | { |
177 | struct s3c_gpio_chip *my_chip = s3c_gpiolib_getchip(pin); | 177 | struct samsung_gpio_chip *my_chip = samsung_gpiolib_getchip(pin); |
178 | int offset, group; | 178 | int offset, group; |
179 | int ret; | 179 | int ret; |
180 | 180 | ||