diff options
-rw-r--r-- | Documentation/arm/Samsung/Bootloader-interface.txt | 5 | ||||
-rw-r--r-- | arch/arm/mach-s3c24xx/mach-h1940.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-s3c24xx/mach-rx1950.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/dev-backlight.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/mach-crag6410.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/mach-hmt.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/mach-smartq.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/mach-smdk6410.c | 8 |
8 files changed, 44 insertions, 18 deletions
diff --git a/Documentation/arm/Samsung/Bootloader-interface.txt b/Documentation/arm/Samsung/Bootloader-interface.txt index df8d4fb85939..ed494ac0beb2 100644 --- a/Documentation/arm/Samsung/Bootloader-interface.txt +++ b/Documentation/arm/Samsung/Bootloader-interface.txt | |||
@@ -19,7 +19,7 @@ executing kernel. | |||
19 | Address: sysram_ns_base_addr | 19 | Address: sysram_ns_base_addr |
20 | Offset Value Purpose | 20 | Offset Value Purpose |
21 | ============================================================================= | 21 | ============================================================================= |
22 | 0x08 exynos_cpu_resume_ns System suspend | 22 | 0x08 exynos_cpu_resume_ns, mcpm_entry_point System suspend |
23 | 0x0c 0x00000bad (Magic cookie) System suspend | 23 | 0x0c 0x00000bad (Magic cookie) System suspend |
24 | 0x1c exynos4_secondary_startup Secondary CPU boot | 24 | 0x1c exynos4_secondary_startup Secondary CPU boot |
25 | 0x1c + 4*cpu exynos4_secondary_startup (Exynos4412) Secondary CPU boot | 25 | 0x1c + 4*cpu exynos4_secondary_startup (Exynos4412) Secondary CPU boot |
@@ -56,7 +56,8 @@ Offset Value Purpose | |||
56 | Address: pmu_base_addr | 56 | Address: pmu_base_addr |
57 | Offset Value Purpose | 57 | Offset Value Purpose |
58 | ============================================================================= | 58 | ============================================================================= |
59 | 0x0908 Non-zero (only Exynos3250) Secondary CPU boot up indicator | 59 | 0x0908 Non-zero Secondary CPU boot up indicator |
60 | on Exynos3250 and Exynos542x | ||
60 | 61 | ||
61 | 62 | ||
62 | 4. Glossary | 63 | 4. Glossary |
diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c index d40d4f5244c6..9f54300df4b3 100644 --- a/arch/arm/mach-s3c24xx/mach-h1940.c +++ b/arch/arm/mach-s3c24xx/mach-h1940.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/gpio.h> | 25 | #include <linux/gpio.h> |
26 | #include <linux/input.h> | 26 | #include <linux/input.h> |
27 | #include <linux/gpio_keys.h> | 27 | #include <linux/gpio_keys.h> |
28 | #include <linux/pwm.h> | ||
28 | #include <linux/pwm_backlight.h> | 29 | #include <linux/pwm_backlight.h> |
29 | #include <linux/i2c.h> | 30 | #include <linux/i2c.h> |
30 | #include <linux/leds.h> | 31 | #include <linux/leds.h> |
@@ -469,6 +470,11 @@ static struct s3c24xx_mci_pdata h1940_mmc_cfg __initdata = { | |||
469 | .ocr_avail = MMC_VDD_32_33, | 470 | .ocr_avail = MMC_VDD_32_33, |
470 | }; | 471 | }; |
471 | 472 | ||
473 | static struct pwm_lookup h1940_pwm_lookup[] = { | ||
474 | PWM_LOOKUP("samsung-pwm", 0, "pwm-backlight", NULL, 36296, | ||
475 | PWM_POLARITY_NORMAL), | ||
476 | }; | ||
477 | |||
472 | static int h1940_backlight_init(struct device *dev) | 478 | static int h1940_backlight_init(struct device *dev) |
473 | { | 479 | { |
474 | gpio_request(S3C2410_GPB(0), "Backlight"); | 480 | gpio_request(S3C2410_GPB(0), "Backlight"); |
@@ -503,11 +509,8 @@ static void h1940_backlight_exit(struct device *dev) | |||
503 | 509 | ||
504 | 510 | ||
505 | static struct platform_pwm_backlight_data backlight_data = { | 511 | static struct platform_pwm_backlight_data backlight_data = { |
506 | .pwm_id = 0, | ||
507 | .max_brightness = 100, | 512 | .max_brightness = 100, |
508 | .dft_brightness = 50, | 513 | .dft_brightness = 50, |
509 | /* tcnt = 0x31 */ | ||
510 | .pwm_period_ns = 36296, | ||
511 | .enable_gpio = -1, | 514 | .enable_gpio = -1, |
512 | .init = h1940_backlight_init, | 515 | .init = h1940_backlight_init, |
513 | .notify = h1940_backlight_notify, | 516 | .notify = h1940_backlight_notify, |
@@ -725,6 +728,7 @@ static void __init h1940_init(void) | |||
725 | gpio_request(H1940_LATCH_SD_POWER, "SD power"); | 728 | gpio_request(H1940_LATCH_SD_POWER, "SD power"); |
726 | gpio_direction_output(H1940_LATCH_SD_POWER, 0); | 729 | gpio_direction_output(H1940_LATCH_SD_POWER, 0); |
727 | 730 | ||
731 | pwm_add_table(h1940_pwm_lookup, ARRAY_SIZE(h1940_pwm_lookup)); | ||
728 | platform_add_devices(h1940_devices, ARRAY_SIZE(h1940_devices)); | 732 | platform_add_devices(h1940_devices, ARRAY_SIZE(h1940_devices)); |
729 | 733 | ||
730 | gpio_request(S3C2410_GPA(1), "Red LED blink"); | 734 | gpio_request(S3C2410_GPA(1), "Red LED blink"); |
diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c index 1d35ff375a01..774c982a7b7e 100644 --- a/arch/arm/mach-s3c24xx/mach-rx1950.c +++ b/arch/arm/mach-s3c24xx/mach-rx1950.c | |||
@@ -375,6 +375,11 @@ static struct s3c2410fb_mach_info rx1950_lcd_cfg = { | |||
375 | 375 | ||
376 | }; | 376 | }; |
377 | 377 | ||
378 | static struct pwm_lookup rx1950_pwm_lookup[] = { | ||
379 | PWM_LOOKUP("samsung-pwm", 0, "pwm-backlight.0", NULL, 48000, | ||
380 | PWM_POLARITY_NORMAL), | ||
381 | }; | ||
382 | |||
378 | static struct pwm_device *lcd_pwm; | 383 | static struct pwm_device *lcd_pwm; |
379 | 384 | ||
380 | static void rx1950_lcd_power(int enable) | 385 | static void rx1950_lcd_power(int enable) |
@@ -520,10 +525,8 @@ static int rx1950_backlight_notify(struct device *dev, int brightness) | |||
520 | } | 525 | } |
521 | 526 | ||
522 | static struct platform_pwm_backlight_data rx1950_backlight_data = { | 527 | static struct platform_pwm_backlight_data rx1950_backlight_data = { |
523 | .pwm_id = 0, | ||
524 | .max_brightness = 24, | 528 | .max_brightness = 24, |
525 | .dft_brightness = 4, | 529 | .dft_brightness = 4, |
526 | .pwm_period_ns = 48000, | ||
527 | .enable_gpio = -1, | 530 | .enable_gpio = -1, |
528 | .init = rx1950_backlight_init, | 531 | .init = rx1950_backlight_init, |
529 | .notify = rx1950_backlight_notify, | 532 | .notify = rx1950_backlight_notify, |
@@ -792,6 +795,7 @@ static void __init rx1950_init_machine(void) | |||
792 | gpio_direction_output(S3C2410_GPA(4), 0); | 795 | gpio_direction_output(S3C2410_GPA(4), 0); |
793 | gpio_direction_output(S3C2410_GPJ(6), 0); | 796 | gpio_direction_output(S3C2410_GPJ(6), 0); |
794 | 797 | ||
798 | pwm_add_table(rx1950_pwm_lookup, ARRAY_SIZE(rx1950_pwm_lookup)); | ||
795 | platform_add_devices(rx1950_devices, ARRAY_SIZE(rx1950_devices)); | 799 | platform_add_devices(rx1950_devices, ARRAY_SIZE(rx1950_devices)); |
796 | 800 | ||
797 | i2c_register_board_info(0, rx1950_i2c_devices, | 801 | i2c_register_board_info(0, rx1950_i2c_devices, |
diff --git a/arch/arm/mach-s3c64xx/dev-backlight.c b/arch/arm/mach-s3c64xx/dev-backlight.c index 38c323e68e3f..e62e789f9aee 100644 --- a/arch/arm/mach-s3c64xx/dev-backlight.c +++ b/arch/arm/mach-s3c64xx/dev-backlight.c | |||
@@ -69,7 +69,6 @@ static struct samsung_bl_drvdata samsung_dfl_bl_data __initdata = { | |||
69 | .plat_data = { | 69 | .plat_data = { |
70 | .max_brightness = 255, | 70 | .max_brightness = 255, |
71 | .dft_brightness = 255, | 71 | .dft_brightness = 255, |
72 | .pwm_period_ns = 78770, | ||
73 | .enable_gpio = -1, | 72 | .enable_gpio = -1, |
74 | .init = samsung_bl_init, | 73 | .init = samsung_bl_init, |
75 | .exit = samsung_bl_exit, | 74 | .exit = samsung_bl_exit, |
@@ -111,7 +110,6 @@ void __init samsung_bl_set(struct samsung_bl_gpio_info *gpio_info, | |||
111 | samsung_bl_data = &samsung_bl_drvdata->plat_data; | 110 | samsung_bl_data = &samsung_bl_drvdata->plat_data; |
112 | 111 | ||
113 | /* Copy board specific data provided by user */ | 112 | /* Copy board specific data provided by user */ |
114 | samsung_bl_data->pwm_id = bl_data->pwm_id; | ||
115 | samsung_bl_device->dev.parent = &samsung_device_pwm.dev; | 113 | samsung_bl_device->dev.parent = &samsung_device_pwm.dev; |
116 | 114 | ||
117 | if (bl_data->max_brightness) | 115 | if (bl_data->max_brightness) |
@@ -120,8 +118,6 @@ void __init samsung_bl_set(struct samsung_bl_gpio_info *gpio_info, | |||
120 | samsung_bl_data->dft_brightness = bl_data->dft_brightness; | 118 | samsung_bl_data->dft_brightness = bl_data->dft_brightness; |
121 | if (bl_data->lth_brightness) | 119 | if (bl_data->lth_brightness) |
122 | samsung_bl_data->lth_brightness = bl_data->lth_brightness; | 120 | samsung_bl_data->lth_brightness = bl_data->lth_brightness; |
123 | if (bl_data->pwm_period_ns) | ||
124 | samsung_bl_data->pwm_period_ns = bl_data->pwm_period_ns; | ||
125 | if (bl_data->enable_gpio >= 0) | 121 | if (bl_data->enable_gpio >= 0) |
126 | samsung_bl_data->enable_gpio = bl_data->enable_gpio; | 122 | samsung_bl_data->enable_gpio = bl_data->enable_gpio; |
127 | if (bl_data->init) | 123 | if (bl_data->init) |
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c index 65c426bc45f7..d13aa3f9bac4 100644 --- a/arch/arm/mach-s3c64xx/mach-crag6410.c +++ b/arch/arm/mach-s3c64xx/mach-crag6410.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/mmc/host.h> | 25 | #include <linux/mmc/host.h> |
26 | #include <linux/regulator/machine.h> | 26 | #include <linux/regulator/machine.h> |
27 | #include <linux/regulator/fixed.h> | 27 | #include <linux/regulator/fixed.h> |
28 | #include <linux/pwm.h> | ||
28 | #include <linux/pwm_backlight.h> | 29 | #include <linux/pwm_backlight.h> |
29 | #include <linux/dm9000.h> | 30 | #include <linux/dm9000.h> |
30 | #include <linux/gpio_keys.h> | 31 | #include <linux/gpio_keys.h> |
@@ -108,11 +109,14 @@ static struct s3c2410_uartcfg crag6410_uartcfgs[] __initdata = { | |||
108 | }, | 109 | }, |
109 | }; | 110 | }; |
110 | 111 | ||
112 | static struct pwm_lookup crag6410_pwm_lookup[] = { | ||
113 | PWM_LOOKUP("samsung-pwm", 0, "pwm-backlight", NULL, 100000, | ||
114 | PWM_POLARITY_NORMAL), | ||
115 | }; | ||
116 | |||
111 | static struct platform_pwm_backlight_data crag6410_backlight_data = { | 117 | static struct platform_pwm_backlight_data crag6410_backlight_data = { |
112 | .pwm_id = 0, | ||
113 | .max_brightness = 1000, | 118 | .max_brightness = 1000, |
114 | .dft_brightness = 600, | 119 | .dft_brightness = 600, |
115 | .pwm_period_ns = 100000, /* about 1kHz */ | ||
116 | .enable_gpio = -1, | 120 | .enable_gpio = -1, |
117 | }; | 121 | }; |
118 | 122 | ||
@@ -843,6 +847,7 @@ static void __init crag6410_machine_init(void) | |||
843 | samsung_keypad_set_platdata(&crag6410_keypad_data); | 847 | samsung_keypad_set_platdata(&crag6410_keypad_data); |
844 | s3c64xx_spi0_set_platdata(NULL, 0, 2); | 848 | s3c64xx_spi0_set_platdata(NULL, 0, 2); |
845 | 849 | ||
850 | pwm_add_table(crag6410_pwm_lookup, ARRAY_SIZE(crag6410_pwm_lookup)); | ||
846 | platform_add_devices(crag6410_devices, ARRAY_SIZE(crag6410_devices)); | 851 | platform_add_devices(crag6410_devices, ARRAY_SIZE(crag6410_devices)); |
847 | 852 | ||
848 | gpio_led_register_device(-1, &gpio_leds_pdata); | 853 | gpio_led_register_device(-1, &gpio_leds_pdata); |
diff --git a/arch/arm/mach-s3c64xx/mach-hmt.c b/arch/arm/mach-s3c64xx/mach-hmt.c index e4b087c58ee6..816b39d1e6d1 100644 --- a/arch/arm/mach-s3c64xx/mach-hmt.c +++ b/arch/arm/mach-s3c64xx/mach-hmt.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/gpio.h> | 19 | #include <linux/gpio.h> |
20 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
21 | #include <linux/leds.h> | 21 | #include <linux/leds.h> |
22 | #include <linux/pwm.h> | ||
22 | #include <linux/pwm_backlight.h> | 23 | #include <linux/pwm_backlight.h> |
23 | #include <linux/mtd/mtd.h> | 24 | #include <linux/mtd/mtd.h> |
24 | #include <linux/mtd/partitions.h> | 25 | #include <linux/mtd/partitions.h> |
@@ -73,6 +74,11 @@ static struct s3c2410_uartcfg hmt_uartcfgs[] __initdata = { | |||
73 | }, | 74 | }, |
74 | }; | 75 | }; |
75 | 76 | ||
77 | static struct pwm_lookup hmt_pwm_lookup[] = { | ||
78 | PWM_LOOKUP("samsung-pwm", 1, "pwm-backlight.0", NULL, | ||
79 | 1000000000 / (100 * 256 * 20), PWM_POLARITY_NORMAL), | ||
80 | }; | ||
81 | |||
76 | static int hmt_bl_init(struct device *dev) | 82 | static int hmt_bl_init(struct device *dev) |
77 | { | 83 | { |
78 | int ret; | 84 | int ret; |
@@ -110,10 +116,8 @@ static void hmt_bl_exit(struct device *dev) | |||
110 | } | 116 | } |
111 | 117 | ||
112 | static struct platform_pwm_backlight_data hmt_backlight_data = { | 118 | static struct platform_pwm_backlight_data hmt_backlight_data = { |
113 | .pwm_id = 1, | ||
114 | .max_brightness = 100 * 256, | 119 | .max_brightness = 100 * 256, |
115 | .dft_brightness = 40 * 256, | 120 | .dft_brightness = 40 * 256, |
116 | .pwm_period_ns = 1000000000 / (100 * 256 * 20), | ||
117 | .enable_gpio = -1, | 121 | .enable_gpio = -1, |
118 | .init = hmt_bl_init, | 122 | .init = hmt_bl_init, |
119 | .notify = hmt_bl_notify, | 123 | .notify = hmt_bl_notify, |
@@ -268,6 +272,7 @@ static void __init hmt_machine_init(void) | |||
268 | gpio_request(S3C64XX_GPF(13), "usb power"); | 272 | gpio_request(S3C64XX_GPF(13), "usb power"); |
269 | gpio_direction_output(S3C64XX_GPF(13), 1); | 273 | gpio_direction_output(S3C64XX_GPF(13), 1); |
270 | 274 | ||
275 | pwm_add_table(hmt_pwm_lookup, ARRAY_SIZE(hmt_pwm_lookup)); | ||
271 | platform_add_devices(hmt_devices, ARRAY_SIZE(hmt_devices)); | 276 | platform_add_devices(hmt_devices, ARRAY_SIZE(hmt_devices)); |
272 | } | 277 | } |
273 | 278 | ||
diff --git a/arch/arm/mach-s3c64xx/mach-smartq.c b/arch/arm/mach-s3c64xx/mach-smartq.c index b3d13537a7f0..7b8a3699795c 100644 --- a/arch/arm/mach-s3c64xx/mach-smartq.c +++ b/arch/arm/mach-s3c64xx/mach-smartq.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/gpio.h> | 14 | #include <linux/gpio.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/pwm.h> | ||
17 | #include <linux/pwm_backlight.h> | 18 | #include <linux/pwm_backlight.h> |
18 | #include <linux/serial_core.h> | 19 | #include <linux/serial_core.h> |
19 | #include <linux/serial_s3c.h> | 20 | #include <linux/serial_s3c.h> |
@@ -139,6 +140,11 @@ static struct platform_device smartq_usb_otg_vbus_dev = { | |||
139 | .dev.platform_data = &smartq_usb_otg_vbus_pdata, | 140 | .dev.platform_data = &smartq_usb_otg_vbus_pdata, |
140 | }; | 141 | }; |
141 | 142 | ||
143 | static struct pwm_lookup smartq_pwm_lookup[] = { | ||
144 | PWM_LOOKUP("samsung-pwm", 1, "pwm-backlight.0", NULL, | ||
145 | 1000000000 / (1000 * 20), PWM_POLARITY_NORMAL), | ||
146 | }; | ||
147 | |||
142 | static int smartq_bl_init(struct device *dev) | 148 | static int smartq_bl_init(struct device *dev) |
143 | { | 149 | { |
144 | s3c_gpio_cfgpin(S3C64XX_GPF(15), S3C_GPIO_SFN(2)); | 150 | s3c_gpio_cfgpin(S3C64XX_GPF(15), S3C_GPIO_SFN(2)); |
@@ -147,10 +153,8 @@ static int smartq_bl_init(struct device *dev) | |||
147 | } | 153 | } |
148 | 154 | ||
149 | static struct platform_pwm_backlight_data smartq_backlight_data = { | 155 | static struct platform_pwm_backlight_data smartq_backlight_data = { |
150 | .pwm_id = 1, | ||
151 | .max_brightness = 1000, | 156 | .max_brightness = 1000, |
152 | .dft_brightness = 600, | 157 | .dft_brightness = 600, |
153 | .pwm_period_ns = 1000000000 / (1000 * 20), | ||
154 | .enable_gpio = -1, | 158 | .enable_gpio = -1, |
155 | .init = smartq_bl_init, | 159 | .init = smartq_bl_init, |
156 | }; | 160 | }; |
@@ -396,5 +400,6 @@ void __init smartq_machine_init(void) | |||
396 | WARN_ON(smartq_usb_host_init()); | 400 | WARN_ON(smartq_usb_host_init()); |
397 | WARN_ON(smartq_wifi_init()); | 401 | WARN_ON(smartq_wifi_init()); |
398 | 402 | ||
403 | pwm_add_table(smartq_pwm_lookup, ARRAY_SIZE(smartq_pwm_lookup)); | ||
399 | platform_add_devices(smartq_devices, ARRAY_SIZE(smartq_devices)); | 404 | platform_add_devices(smartq_devices, ARRAY_SIZE(smartq_devices)); |
400 | } | 405 | } |
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c index d590b88bd8a8..2722800d5c11 100644 --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/smsc911x.h> | 30 | #include <linux/smsc911x.h> |
31 | #include <linux/regulator/fixed.h> | 31 | #include <linux/regulator/fixed.h> |
32 | #include <linux/regulator/machine.h> | 32 | #include <linux/regulator/machine.h> |
33 | #include <linux/pwm.h> | ||
33 | #include <linux/pwm_backlight.h> | 34 | #include <linux/pwm_backlight.h> |
34 | #include <linux/platform_data/s3c-hsotg.h> | 35 | #include <linux/platform_data/s3c-hsotg.h> |
35 | 36 | ||
@@ -623,8 +624,12 @@ static struct samsung_bl_gpio_info smdk6410_bl_gpio_info = { | |||
623 | .func = S3C_GPIO_SFN(2), | 624 | .func = S3C_GPIO_SFN(2), |
624 | }; | 625 | }; |
625 | 626 | ||
627 | static struct pwm_lookup smdk6410_pwm_lookup[] = { | ||
628 | PWM_LOOKUP("samsung-pwm", 1, "pwm-backlight.0", NULL, 78770, | ||
629 | PWM_POLARITY_NORMAL), | ||
630 | }; | ||
631 | |||
626 | static struct platform_pwm_backlight_data smdk6410_bl_data = { | 632 | static struct platform_pwm_backlight_data smdk6410_bl_data = { |
627 | .pwm_id = 1, | ||
628 | .enable_gpio = -1, | 633 | .enable_gpio = -1, |
629 | }; | 634 | }; |
630 | 635 | ||
@@ -695,6 +700,7 @@ static void __init smdk6410_machine_init(void) | |||
695 | 700 | ||
696 | platform_add_devices(smdk6410_devices, ARRAY_SIZE(smdk6410_devices)); | 701 | platform_add_devices(smdk6410_devices, ARRAY_SIZE(smdk6410_devices)); |
697 | 702 | ||
703 | pwm_add_table(smdk6410_pwm_lookup, ARRAY_SIZE(smdk6410_pwm_lookup)); | ||
698 | samsung_bl_set(&smdk6410_bl_gpio_info, &smdk6410_bl_data); | 704 | samsung_bl_set(&smdk6410_bl_gpio_info, &smdk6410_bl_data); |
699 | } | 705 | } |
700 | 706 | ||