Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 59003145 authored by Michael Hennerich's avatar Michael Hennerich Committed by Bryan Wu
Browse files

Blackfin arch: add new processor ADSP-BF52x arch/mach support

parent cfa76f02
Loading
Loading
Loading
Loading
+45 −6
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ config GENERIC_CALIBRATE_DELAY

config IRQCHIP_DEMUX_GPIO
	bool
	depends on (BF53x || BF561 || BF54x)
	depends on (BF52x || BF53x || BF561 || BF54x)
	default y

source "init/Kconfig"
@@ -85,6 +85,21 @@ choice
	prompt "CPU"
	default BF533

config BF522
	bool "BF522"
	help
	  BF522 Processor Support.

config BF525
	bool "BF525"
	help
	  BF525 Processor Support.

config BF527
	bool "BF527"
	help
	  BF527 Processor Support.

config BF531
	bool "BF531"
	help
@@ -144,13 +159,18 @@ endchoice

choice
	prompt "Silicon Rev"
	default BF_REV_0_1 if BF527
	default BF_REV_0_2 if BF537
	default BF_REV_0_3 if BF533
	default BF_REV_0_0 if BF549

config BF_REV_0_0
	bool "0.0"
	depends on (BF549)
	depends on (BF549 || BF527)

config BF_REV_0_1
	bool "0.2"
	depends on (BF549 || BF527)

config BF_REV_0_2
	bool "0.2"
@@ -176,6 +196,11 @@ config BF_REV_NONE

endchoice

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

config BF53x
	bool
	depends on (BF531 || BF532 || BF533 || BF534 || BF536 || BF537)
@@ -204,6 +229,12 @@ choice
	  configuration to ensure that all the other settings are
	  correct.

config BFIN527_EZKIT
	bool "BF527-EZKIT"
	depends on (BF522 || BF525 || BF527)
	help
	  BF533-EZKIT-LITE board Support.

config BFIN533_EZKIT
	bool "BF533-EZKIT"
	depends on (BF533 || BF532 || BF531)
@@ -299,11 +330,17 @@ config MEM_MT48LC8M32B2B5_7
	depends on (BFIN561_BLUETECHNIX_CM)
	default y

config MEM_MT48LC32M16A2TG_75
	bool
	depends on (BFIN527_EZKIT)
	default y

config BFIN_SHARED_FLASH_ENET
	bool
	depends on (BFIN533_STAMP)
	default y

source "arch/blackfin/mach-bf527/Kconfig"
source "arch/blackfin/mach-bf533/Kconfig"
source "arch/blackfin/mach-bf561/Kconfig"
source "arch/blackfin/mach-bf537/Kconfig"
@@ -329,7 +366,7 @@ config CLKIN_HZ
	int "Crystal Frequency in Hz"
	default "11059200" if BFIN533_STAMP
	default "27000000" if BFIN533_EZKIT
	default "25000000" if BFIN537_STAMP
	default "25000000" if (BFIN537_STAMP || BFIN527_EZKIT)
	default "30000000" if BFIN561_EZKIT
	default "24576000" if PNAV10
	help
@@ -362,7 +399,7 @@ config VCO_MULT
	range 1 64
	default "22" if BFIN533_EZKIT
	default "45" if BFIN533_STAMP
	default "20" if BFIN537_STAMP
	default "20" if (BFIN537_STAMP || BFIN527_EZKIT)
	default "22" if BFIN533_BLUETECHNIX_CM
	default "20" if BFIN537_BLUETECHNIX_CM
	default "20" if BFIN561_BLUETECHNIX_CM
@@ -398,7 +435,7 @@ config SCLK_DIV
	range 1 15
	default 5 if BFIN533_EZKIT
	default 5 if BFIN533_STAMP
	default 4 if BFIN537_STAMP
	default 4 if (BFIN537_STAMP || BFIN527_EZKIT)
	default 5 if BFIN533_BLUETECHNIX_CM
	default 4 if BFIN537_BLUETECHNIX_CM
	default 4 if BFIN561_BLUETECHNIX_CM
@@ -450,6 +487,7 @@ comment "Memory Setup"
config MEM_SIZE
	int "SDRAM Memory Size in MBytes"
	default  32 if BFIN533_EZKIT
	default  64 if BFIN527_EZKIT
	default  64 if BFIN537_STAMP
	default  64 if BFIN561_EZKIT
	default 128 if BFIN533_STAMP
@@ -459,6 +497,7 @@ config MEM_ADD_WIDTH
	int "SDRAM Memory Address Width"
	default  9 if BFIN533_EZKIT
	default  9 if BFIN561_EZKIT
	default 10 if BFIN527_EZKIT
	default 10 if BFIN537_STAMP
	default 11 if BFIN533_STAMP
	default 10 if PNAV10
@@ -751,7 +790,7 @@ config LARGE_ALLOCS

config BFIN_DMA_5XX
	bool "Enable DMA Support"
	depends on (BF533 || BF532 || BF531 || BF537 || BF536 || BF534 || BF561 || BF54x)
	depends on (BF52x || BF53x || BF561 || BF54x)
	default y
	help
	  DMA driver for BF5xx.
+6 −0
Original line number Diff line number Diff line
@@ -18,6 +18,9 @@ KALLSYMS += --symbol-prefix=_
KBUILD_DEFCONFIG := BF537-STAMP_defconfig

# setup the machine name and the machine dependent settings
machine-$(CONFIG_BF522) := bf527
machine-$(CONFIG_BF525) := bf527
machine-$(CONFIG_BF527) := bf527
machine-$(CONFIG_BF531) := bf533
machine-$(CONFIG_BF532) := bf533
machine-$(CONFIG_BF533) := bf533
@@ -32,6 +35,9 @@ machine-$(CONFIG_BF561) := bf561
MACHINE := $(machine-y)
export MACHINE

cpu-$(CONFIG_BF522) := bf522
cpu-$(CONFIG_BF525) := bf525
cpu-$(CONFIG_BF527) := bf527
cpu-$(CONFIG_BF531) := bf531
cpu-$(CONFIG_BF532) := bf532
cpu-$(CONFIG_BF533) := bf533
+1241 −0

File added.

Preview size limit exceeded, changes collapsed.

+33 −2
Original line number Diff line number Diff line
@@ -124,7 +124,7 @@ static struct gpio_port_t *gpio_bankb[gpio_bank(MAX_BLACKFIN_GPIOS)] = {
};
#endif

#ifdef BF537_FAMILY
#if defined(BF527_FAMILY) || defined(BF537_FAMILY)
static struct gpio_port_t *gpio_bankb[gpio_bank(MAX_BLACKFIN_GPIOS)] = {
	(struct gpio_port_t *) PORTFIO,
	(struct gpio_port_t *) PORTGIO,
@@ -139,6 +139,21 @@ static unsigned short *port_fer[gpio_bank(MAX_BLACKFIN_GPIOS)] = {

#endif

#ifdef BF527_FAMILY
static unsigned short *port_mux[gpio_bank(MAX_BLACKFIN_GPIOS)] = {
	(unsigned short *) PORTF_MUX,
	(unsigned short *) PORTG_MUX,
	(unsigned short *) PORTH_MUX,
};

static const
u8 pmux_offset[][16] =
	{{ 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 4, 6, 8, 8, 10, 10 }, /* PORTF */
	 { 0, 0, 0, 0, 0, 2, 2, 4, 4, 6, 8, 10, 10, 10, 12, 12 }, /* PORTG */
	 { 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 4, 4, 4, 4, 4, 4 }, /* PORTH */
	};
#endif

#ifdef BF561_FAMILY
static struct gpio_port_t *gpio_bankb[gpio_bank(MAX_BLACKFIN_GPIOS)] = {
	(struct gpio_port_t *) FIO0_FLAG_D,
@@ -186,6 +201,10 @@ static unsigned int sic_iwr_irqs[gpio_bank(MAX_BLACKFIN_GPIOS)] = {IRQ_PROG_INTB
static unsigned int sic_iwr_irqs[gpio_bank(MAX_BLACKFIN_GPIOS)] = {IRQ_PROG_INTB, IRQ_PORTG_INTB, IRQ_MAC_TX};
#endif

#ifdef BF527_FAMILY
static unsigned int sic_iwr_irqs[gpio_bank(MAX_BLACKFIN_GPIOS)] = {IRQ_PORTF_INTB, IRQ_PORTG_INTB, IRQ_PORTH_INTB};
#endif

#ifdef BF561_FAMILY
static unsigned int sic_iwr_irqs[gpio_bank(MAX_BLACKFIN_GPIOS)] = {IRQ_PROG0_INTB, IRQ_PROG1_INTB, IRQ_PROG2_INTB};
#endif
@@ -238,7 +257,7 @@ static int cmp_label(unsigned short ident, const char *label)
		return -EINVAL;
}

#ifdef BF537_FAMILY
#if defined(BF527_FAMILY) || defined(BF537_FAMILY)
static void port_setup(unsigned short gpio, unsigned short usage)
{
	if (!check_gpio(gpio)) {
@@ -354,6 +373,18 @@ inline u16 get_portmux(unsigned short portno)

	return (pmux >> (2 * gpio_sub_n(portno)) & 0x3);
}
#elif defined(BF527_FAMILY)
inline void portmux_setup(unsigned short portno, unsigned short function)
{
	u16 pmux, ident = P_IDENT(portno);
	u8 offset = pmux_offset[gpio_bank(ident)][gpio_sub_n(ident)];

	pmux = *port_mux[gpio_bank(ident)];
	pmux &= ~(3 << offset);
	pmux |= (function & 3) << offset;
	*port_mux[gpio_bank(ident)] = pmux;
	SSYNC();
}
#else
# define portmux_setup(...)  do { } while (0)
#endif
+1 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@
#include <asm/reboot.h>
#include <asm/system.h>

#if defined(BF537_FAMILY) || defined(BF533_FAMILY)
#if defined(BF537_FAMILY) || defined(BF533_FAMILY) || defined(BF527_FAMILY)
#define SYSCR_VAL 	0x0
#elif defined(BF561_FAMILY)
#define SYSCR_VAL 	0x20
Loading