diff options
author | Mike Frysinger <michael.frysinger@analog.com> | 2007-12-24 03:54:48 -0500 |
---|---|---|
committer | Bryan Wu <bryan.wu@analog.com> | 2007-12-24 03:54:48 -0500 |
commit | 1545a1111a02b5aafe6f141e133a6269c5741285 (patch) | |
tree | f018c4b0c074c3e9ed72d887d74948a88165a9c5 /arch/blackfin | |
parent | 54a1668ce53fe701f1d36651b591ced388e97275 (diff) |
[Blackfin] arch: add support for BF523/BF524/BF526
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Diffstat (limited to 'arch/blackfin')
-rw-r--r-- | arch/blackfin/Kconfig | 26 | ||||
-rw-r--r-- | arch/blackfin/Makefile | 6 | ||||
-rw-r--r-- | arch/blackfin/kernel/bfin_gpio.c | 34 |
3 files changed, 63 insertions, 3 deletions
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index e4ccdcdb4639..a241a0a27de2 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig | |||
@@ -85,11 +85,26 @@ config BF522 | |||
85 | help | 85 | help |
86 | BF522 Processor Support. | 86 | BF522 Processor Support. |
87 | 87 | ||
88 | config BF523 | ||
89 | bool "BF523" | ||
90 | help | ||
91 | BF523 Processor Support. | ||
92 | |||
93 | config BF524 | ||
94 | bool "BF524" | ||
95 | help | ||
96 | BF524 Processor Support. | ||
97 | |||
88 | config BF525 | 98 | config BF525 |
89 | bool "BF525" | 99 | bool "BF525" |
90 | help | 100 | help |
91 | BF525 Processor Support. | 101 | BF525 Processor Support. |
92 | 102 | ||
103 | config BF526 | ||
104 | bool "BF526" | ||
105 | help | ||
106 | BF526 Processor Support. | ||
107 | |||
93 | config BF527 | 108 | config BF527 |
94 | bool "BF527" | 109 | bool "BF527" |
95 | help | 110 | help |
@@ -198,7 +213,7 @@ endchoice | |||
198 | 213 | ||
199 | config BF52x | 214 | config BF52x |
200 | bool | 215 | bool |
201 | depends on (BF522 || BF525 || BF527) | 216 | depends on (BF522 || BF523 || BF524 || BF525 || BF526 || BF527) |
202 | default y | 217 | default y |
203 | 218 | ||
204 | config BF53x | 219 | config BF53x |
@@ -371,7 +386,10 @@ config SCLK_DIV | |||
371 | config MAX_VCO_HZ | 386 | config MAX_VCO_HZ |
372 | int | 387 | int |
373 | default 600000000 if BF522 | 388 | default 600000000 if BF522 |
389 | default 400000000 if BF523 | ||
390 | default 400000000 if BF524 | ||
374 | default 600000000 if BF525 | 391 | default 600000000 if BF525 |
392 | default 400000000 if BF526 | ||
375 | default 600000000 if BF527 | 393 | default 600000000 if BF527 |
376 | default 400000000 if BF531 | 394 | default 400000000 if BF531 |
377 | default 400000000 if BF532 | 395 | default 400000000 if BF532 |
@@ -383,6 +401,8 @@ config MAX_VCO_HZ | |||
383 | default 533333333 if BF539 | 401 | default 533333333 if BF539 |
384 | default 600000000 if BF542 | 402 | default 600000000 if BF542 |
385 | default 533333333 if BF544 | 403 | default 533333333 if BF544 |
404 | default 600000000 if BF547 | ||
405 | default 600000000 if BF548 | ||
386 | default 533333333 if BF549 | 406 | default 533333333 if BF549 |
387 | default 600000000 if BF561 | 407 | default 600000000 if BF561 |
388 | 408 | ||
@@ -897,8 +917,8 @@ config PM_WAKEUP_SIC_IWR | |||
897 | depends on PM_WAKEUP_GPIO_BY_SIC_IWR | 917 | depends on PM_WAKEUP_GPIO_BY_SIC_IWR |
898 | default 0x80000000 if (BF537 || BF536 || BF534) | 918 | default 0x80000000 if (BF537 || BF536 || BF534) |
899 | default 0x100000 if (BF533 || BF532 || BF531) | 919 | default 0x100000 if (BF533 || BF532 || BF531) |
900 | default 0x800000 if (BF549 || BF548 || BF547 || BF542) | 920 | default 0x800000 if (BF54x) |
901 | default 0x800000 if (BF527 || BF524 || BF522) | 921 | default 0x800000 if (BF52x) |
902 | 922 | ||
903 | config PM_WAKEUP_GPIO_NUMBER | 923 | config PM_WAKEUP_GPIO_NUMBER |
904 | int "Wakeup GPIO number" | 924 | int "Wakeup GPIO number" |
diff --git a/arch/blackfin/Makefile b/arch/blackfin/Makefile index c47e000f8324..0c9680eac8ef 100644 --- a/arch/blackfin/Makefile +++ b/arch/blackfin/Makefile | |||
@@ -21,7 +21,10 @@ KBUILD_DEFCONFIG := BF537-STAMP_defconfig | |||
21 | 21 | ||
22 | # setup the machine name and the machine dependent settings | 22 | # setup the machine name and the machine dependent settings |
23 | machine-$(CONFIG_BF522) := bf527 | 23 | machine-$(CONFIG_BF522) := bf527 |
24 | machine-$(CONFIG_BF523) := bf527 | ||
25 | machine-$(CONFIG_BF524) := bf527 | ||
24 | machine-$(CONFIG_BF525) := bf527 | 26 | machine-$(CONFIG_BF525) := bf527 |
27 | machine-$(CONFIG_BF526) := bf527 | ||
25 | machine-$(CONFIG_BF527) := bf527 | 28 | machine-$(CONFIG_BF527) := bf527 |
26 | machine-$(CONFIG_BF531) := bf533 | 29 | machine-$(CONFIG_BF531) := bf533 |
27 | machine-$(CONFIG_BF532) := bf533 | 30 | machine-$(CONFIG_BF532) := bf533 |
@@ -39,7 +42,10 @@ MACHINE := $(machine-y) | |||
39 | export MACHINE | 42 | export MACHINE |
40 | 43 | ||
41 | cpu-$(CONFIG_BF522) := bf522 | 44 | cpu-$(CONFIG_BF522) := bf522 |
45 | cpu-$(CONFIG_BF523) := bf523 | ||
46 | cpu-$(CONFIG_BF524) := bf524 | ||
42 | cpu-$(CONFIG_BF525) := bf525 | 47 | cpu-$(CONFIG_BF525) := bf525 |
48 | cpu-$(CONFIG_BF526) := bf526 | ||
43 | cpu-$(CONFIG_BF527) := bf527 | 49 | cpu-$(CONFIG_BF527) := bf527 |
44 | cpu-$(CONFIG_BF531) := bf531 | 50 | cpu-$(CONFIG_BF531) := bf531 |
45 | cpu-$(CONFIG_BF532) := bf532 | 51 | cpu-$(CONFIG_BF532) := bf532 |
diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c index ce85d4bf34ca..ea13d2a22d69 100644 --- a/arch/blackfin/kernel/bfin_gpio.c +++ b/arch/blackfin/kernel/bfin_gpio.c | |||
@@ -83,6 +83,7 @@ | |||
83 | #include <linux/delay.h> | 83 | #include <linux/delay.h> |
84 | #include <linux/module.h> | 84 | #include <linux/module.h> |
85 | #include <linux/err.h> | 85 | #include <linux/err.h> |
86 | #include <linux/proc_fs.h> | ||
86 | #include <asm/blackfin.h> | 87 | #include <asm/blackfin.h> |
87 | #include <asm/gpio.h> | 88 | #include <asm/gpio.h> |
88 | #include <asm/portmux.h> | 89 | #include <asm/portmux.h> |
@@ -1194,3 +1195,36 @@ void bfin_gpio_reset_spi0_ssel1(void) | |||
1194 | } | 1195 | } |
1195 | 1196 | ||
1196 | #endif /*BF548_FAMILY */ | 1197 | #endif /*BF548_FAMILY */ |
1198 | |||
1199 | #if defined(CONFIG_PROC_FS) | ||
1200 | static int gpio_proc_read(char *buf, char **start, off_t offset, | ||
1201 | int len, int *unused_i, void *unused_v) | ||
1202 | { | ||
1203 | int c, outlen = 0; | ||
1204 | |||
1205 | for (c = 0; c < MAX_RESOURCES; c++) { | ||
1206 | if (!check_gpio(c) && (reserved_gpio_map[gpio_bank(c)] & gpio_bit(c))) | ||
1207 | len = sprintf(buf, "GPIO_%d: %s \tGPIO %s\n", c, | ||
1208 | get_label(c), get_gpio_dir(c) ? "OUTPUT" : "INPUT"); | ||
1209 | else if (reserved_peri_map[gpio_bank(c)] & gpio_bit(c)) | ||
1210 | len = sprintf(buf, "GPIO_%d: %s \tPeripheral\n", c, get_label(c)); | ||
1211 | else | ||
1212 | continue; | ||
1213 | buf += len; | ||
1214 | outlen += len; | ||
1215 | } | ||
1216 | return outlen; | ||
1217 | } | ||
1218 | |||
1219 | static __init int gpio_register_proc(void) | ||
1220 | { | ||
1221 | struct proc_dir_entry *proc_gpio; | ||
1222 | |||
1223 | proc_gpio = create_proc_entry("gpio", S_IRUGO, NULL); | ||
1224 | if (proc_gpio) | ||
1225 | proc_gpio->read_proc = gpio_proc_read; | ||
1226 | return proc_gpio != NULL; | ||
1227 | } | ||
1228 | |||
1229 | __initcall(gpio_register_proc); | ||
1230 | #endif | ||