Skip to content

Commit

Permalink
[Blackfin] arch: add support for BF523/BF524/BF526
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
  • Loading branch information
Mike Frysinger authored and Bryan Wu committed Dec 24, 2007
1 parent 54a1668 commit 1545a11
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 3 deletions.
26 changes: 23 additions & 3 deletions arch/blackfin/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,26 @@ config BF522
help
BF522 Processor Support.

config BF523
bool "BF523"
help
BF523 Processor Support.

config BF524
bool "BF524"
help
BF524 Processor Support.

config BF525
bool "BF525"
help
BF525 Processor Support.

config BF526
bool "BF526"
help
BF526 Processor Support.

config BF527
bool "BF527"
help
Expand Down Expand Up @@ -198,7 +213,7 @@ endchoice

config BF52x
bool
depends on (BF522 || BF525 || BF527)
depends on (BF522 || BF523 || BF524 || BF525 || BF526 || BF527)
default y

config BF53x
Expand Down Expand Up @@ -371,7 +386,10 @@ config SCLK_DIV
config MAX_VCO_HZ
int
default 600000000 if BF522
default 400000000 if BF523
default 400000000 if BF524
default 600000000 if BF525
default 400000000 if BF526
default 600000000 if BF527
default 400000000 if BF531
default 400000000 if BF532
Expand All @@ -383,6 +401,8 @@ config MAX_VCO_HZ
default 533333333 if BF539
default 600000000 if BF542
default 533333333 if BF544
default 600000000 if BF547
default 600000000 if BF548
default 533333333 if BF549
default 600000000 if BF561

Expand Down Expand Up @@ -897,8 +917,8 @@ config PM_WAKEUP_SIC_IWR
depends on PM_WAKEUP_GPIO_BY_SIC_IWR
default 0x80000000 if (BF537 || BF536 || BF534)
default 0x100000 if (BF533 || BF532 || BF531)
default 0x800000 if (BF549 || BF548 || BF547 || BF542)
default 0x800000 if (BF527 || BF524 || BF522)
default 0x800000 if (BF54x)
default 0x800000 if (BF52x)

config PM_WAKEUP_GPIO_NUMBER
int "Wakeup GPIO number"
Expand Down
6 changes: 6 additions & 0 deletions arch/blackfin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ KBUILD_DEFCONFIG := BF537-STAMP_defconfig

# setup the machine name and the machine dependent settings
machine-$(CONFIG_BF522) := bf527
machine-$(CONFIG_BF523) := bf527
machine-$(CONFIG_BF524) := bf527
machine-$(CONFIG_BF525) := bf527
machine-$(CONFIG_BF526) := bf527
machine-$(CONFIG_BF527) := bf527
machine-$(CONFIG_BF531) := bf533
machine-$(CONFIG_BF532) := bf533
Expand All @@ -39,7 +42,10 @@ MACHINE := $(machine-y)
export MACHINE

cpu-$(CONFIG_BF522) := bf522
cpu-$(CONFIG_BF523) := bf523
cpu-$(CONFIG_BF524) := bf524
cpu-$(CONFIG_BF525) := bf525
cpu-$(CONFIG_BF526) := bf526
cpu-$(CONFIG_BF527) := bf527
cpu-$(CONFIG_BF531) := bf531
cpu-$(CONFIG_BF532) := bf532
Expand Down
34 changes: 34 additions & 0 deletions arch/blackfin/kernel/bfin_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/err.h>
#include <linux/proc_fs.h>
#include <asm/blackfin.h>
#include <asm/gpio.h>
#include <asm/portmux.h>
Expand Down Expand Up @@ -1194,3 +1195,36 @@ void bfin_gpio_reset_spi0_ssel1(void)
}

#endif /*BF548_FAMILY */

#if defined(CONFIG_PROC_FS)
static int gpio_proc_read(char *buf, char **start, off_t offset,
int len, int *unused_i, void *unused_v)
{
int c, outlen = 0;

for (c = 0; c < MAX_RESOURCES; c++) {
if (!check_gpio(c) && (reserved_gpio_map[gpio_bank(c)] & gpio_bit(c)))
len = sprintf(buf, "GPIO_%d: %s \tGPIO %s\n", c,
get_label(c), get_gpio_dir(c) ? "OUTPUT" : "INPUT");
else if (reserved_peri_map[gpio_bank(c)] & gpio_bit(c))
len = sprintf(buf, "GPIO_%d: %s \tPeripheral\n", c, get_label(c));
else
continue;
buf += len;
outlen += len;
}
return outlen;
}

static __init int gpio_register_proc(void)
{
struct proc_dir_entry *proc_gpio;

proc_gpio = create_proc_entry("gpio", S_IRUGO, NULL);
if (proc_gpio)
proc_gpio->read_proc = gpio_proc_read;
return proc_gpio != NULL;
}

__initcall(gpio_register_proc);
#endif

0 comments on commit 1545a11

Please sign in to comment.