summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
Diffstat (limited to 'board')
-rw-r--r--board/bf518f-ezbrd/bf518f-ezbrd.c15
-rw-r--r--board/bf526-ezbrd/bf526-ezbrd.c7
-rw-r--r--board/bf527-ezkit/bf527-ezkit.c20
-rw-r--r--board/bf527-ezkit/video.c148
-rw-r--r--board/bf533-ezkit/bf533-ezkit.c7
-rw-r--r--board/bf533-stamp/Makefile1
-rw-r--r--board/bf533-stamp/bf533-stamp.c120
-rw-r--r--board/bf533-stamp/ide-cf.c90
-rw-r--r--board/bf537-minotaur/bf537-minotaur.c7
-rw-r--r--board/bf537-pnav/bf537-pnav.c7
-rw-r--r--board/bf537-srv1/bf537-srv1.c7
-rw-r--r--board/bf537-stamp/bf537-stamp.c7
-rw-r--r--board/bf538f-ezkit/bf538f-ezkit.c7
-rw-r--r--board/bf548-ezkit/bf548-ezkit.c31
-rw-r--r--board/bf561-acvilon/Makefile56
-rw-r--r--board/bf561-acvilon/bf561-acvilon.c51
-rw-r--r--board/bf561-acvilon/config.mk34
-rw-r--r--board/bf561-ezkit/bf561-ezkit.c7
-rw-r--r--board/blackstamp/blackstamp.c7
-rw-r--r--board/cm-bf527/cm-bf527.c7
-rw-r--r--board/cm-bf533/cm-bf533.c7
-rw-r--r--board/cm-bf537e/cm-bf537e.c7
-rw-r--r--board/cm-bf537u/cm-bf537u.c7
-rw-r--r--board/cm-bf548/cm-bf548.c7
-rw-r--r--board/cm-bf561/cm-bf561.c7
-rw-r--r--board/ibf-dsp561/ibf-dsp561.c7
-rw-r--r--board/tcm-bf518/Makefile54
-rw-r--r--board/tcm-bf518/config.mk33
-rw-r--r--board/tcm-bf518/tcm-bf518.c78
-rw-r--r--board/tcm-bf537/tcm-bf537.c7
30 files changed, 579 insertions, 271 deletions
diff --git a/board/bf518f-ezbrd/bf518f-ezbrd.c b/board/bf518f-ezbrd/bf518f-ezbrd.c
index 63be7cf..85b350f 100644
--- a/board/bf518f-ezbrd/bf518f-ezbrd.c
+++ b/board/bf518f-ezbrd/bf518f-ezbrd.c
@@ -15,6 +15,7 @@
#include <asm/blackfin.h>
#include <asm/net.h>
#include <asm/mach-common/bits/otp.h>
+#include <asm/sdh.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -25,13 +26,6 @@ int checkboard(void)
return 0;
}
-phys_size_t initdram(int board_type)
-{
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_MAX_RAM_SIZE;
- return gd->bd->bi_memsize;
-}
-
#if defined(CONFIG_BFIN_MAC)
static void board_init_enetaddr(uchar *mac_addr)
{
@@ -162,3 +156,10 @@ int board_early_init_f(void)
#endif
return 0;
}
+
+#ifdef CONFIG_BFIN_SDH
+int board_mmc_init(bd_t *bis)
+{
+ return bfin_mmc_init(bis);
+}
+#endif
diff --git a/board/bf526-ezbrd/bf526-ezbrd.c b/board/bf526-ezbrd/bf526-ezbrd.c
index 1666bf6..52d82cd 100644
--- a/board/bf526-ezbrd/bf526-ezbrd.c
+++ b/board/bf526-ezbrd/bf526-ezbrd.c
@@ -24,13 +24,6 @@ int checkboard(void)
return 0;
}
-phys_size_t initdram(int board_type)
-{
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_MAX_RAM_SIZE;
- return gd->bd->bi_memsize;
-}
-
#ifdef CONFIG_BFIN_MAC
static void board_init_enetaddr(uchar *mac_addr)
{
diff --git a/board/bf527-ezkit/bf527-ezkit.c b/board/bf527-ezkit/bf527-ezkit.c
index 2cbfa8d..a911880 100644
--- a/board/bf527-ezkit/bf527-ezkit.c
+++ b/board/bf527-ezkit/bf527-ezkit.c
@@ -24,13 +24,6 @@ int checkboard(void)
return 0;
}
-phys_size_t initdram(int board_type)
-{
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_MAX_RAM_SIZE;
- return gd->bd->bi_memsize;
-}
-
#ifdef CONFIG_BFIN_MAC
static void board_init_enetaddr(uchar *mac_addr)
{
@@ -75,3 +68,16 @@ int misc_init_r(void)
return 0;
}
+
+#ifdef CONFIG_USB_BLACKFIN
+void board_musb_init(void)
+{
+ /*
+ * BF527 EZ-KITs require PG13 to be high for HOST mode
+ */
+ bfin_write_PORTG_FER(bfin_read_PORTG_FER() & ~PG13);
+ bfin_write_PORTGIO_DIR(bfin_read_PORTGIO_DIR() | PG13);
+ bfin_write_PORTGIO_SET(PG13);
+ SSYNC();
+}
+#endif
diff --git a/board/bf527-ezkit/video.c b/board/bf527-ezkit/video.c
index 57652be..8f6ea23 100644
--- a/board/bf527-ezkit/video.c
+++ b/board/bf527-ezkit/video.c
@@ -12,40 +12,111 @@
#include <malloc.h>
#include <asm/blackfin.h>
#include <asm/mach-common/bits/dma.h>
-#include <i2c.h>
+#include <spi.h>
#include <linux/types.h>
#include <stdio_dev.h>
-#define DMA_SIZE16 2
-
#include <asm/mach-common/bits/ppi.h>
#include <asm/mach-common/bits/timer.h>
-#include <asm/bfin_logo_230x230.h>
-
#define LCD_X_RES 320 /* Horizontal Resolution */
#define LCD_Y_RES 240 /* Vertical Resolution */
-#define LCD_BPP 24 /* Bit Per Pixel */
-#define LCD_PIXEL_SIZE (LCD_BPP / 8)
+#define DMA_BUS_SIZE 16
+
+#ifdef CONFIG_MK_BF527_EZKIT_REV_2_1 /* lq035q1 */
+
+#if !defined(CONFIG_LQ035Q1_USE_RGB888_8_BIT_PPI) && \
+ !defined(CONFIG_LQ035Q1_USE_RGB565_8_BIT_PPI)
+# define CONFIG_LQ035Q1_USE_RGB565_8_BIT_PPI
+#endif
+
+/* Interface 16/18-bit TFT over an 8-bit wide PPI using a
+ * small Programmable Logic Device (CPLD)
+ * http://blackfin.uclinux.org/gf/project/stamp/frs/?action=FrsReleaseBrowse&frs_package_id=165
+ */
+
+#ifdef CONFIG_LQ035Q1_USE_RGB565_8_BIT_PPI
+#include <asm/bfin_logo_rgb565_230x230.h>
+#define LCD_BPP 16 /* Bit Per Pixel */
+#define CLOCKS_PPIX 2 /* Clocks per pixel */
+#define CPLD_DELAY 3 /* RGB565 pipeline delay */
+#endif
+
+#ifdef CONFIG_LQ035Q1_USE_RGB888_8_BIT_PPI
+#include <asm/bfin_logo_230x230.h>
+#define LCD_BPP 24 /* Bit Per Pixel */
+#define CLOCKS_PPIX 3 /* Clocks per pixel */
+#define CPLD_DELAY 5 /* RGB888 pipeline delay */
+#endif
+
+/*
+ * HS and VS timing parameters (all in number of PPI clk ticks)
+ */
+
+#define H_ACTPIX (LCD_X_RES * CLOCKS_PPIX) /* active horizontal pixel */
+#define H_PERIOD (336 * CLOCKS_PPIX) /* HS period */
+#define H_PULSE (2 * CLOCKS_PPIX) /* HS pulse width */
+#define H_START (7 * CLOCKS_PPIX + CPLD_DELAY) /* first valid pixel */
+
+#define U_LINE 4 /* Blanking Lines */
+
+#define V_LINES (LCD_Y_RES + U_LINE) /* total vertical lines */
+#define V_PULSE (2 * CLOCKS_PPIX) /* VS pulse width (1-5 H_PERIODs) */
+#define V_PERIOD (H_PERIOD * V_LINES) /* VS period */
+
+#define ACTIVE_VIDEO_MEM_OFFSET ((U_LINE / 2) * LCD_X_RES * (LCD_BPP / 8))
+
+/*
+ * LCD Modes
+ */
+#define LQ035_RL (0 << 8) /* Right -> Left Scan */
+#define LQ035_LR (1 << 8) /* Left -> Right Scan */
+#define LQ035_TB (1 << 9) /* Top -> Botton Scan */
+#define LQ035_BT (0 << 9) /* Botton -> Top Scan */
+#define LQ035_BGR (1 << 11) /* Use BGR format */
+#define LQ035_RGB (0 << 11) /* Use RGB format */
+#define LQ035_NORM (1 << 13) /* Reversal */
+#define LQ035_REV (0 << 13) /* Reversal */
+
+#define LQ035_INDEX 0x74
+#define LQ035_DATA 0x76
-#define DMA_BUS_SIZE 16
-#define LCD_CLK (12*1000*1000) /* 12MHz */
+#define LQ035_DRIVER_OUTPUT_CTL 0x1
+#define LQ035_SHUT_CTL 0x11
-#define CLOCKS_PER_PIX 3
+#define LQ035_DRIVER_OUTPUT_MASK (LQ035_LR | LQ035_TB | LQ035_BGR | LQ035_REV)
+#define LQ035_DRIVER_OUTPUT_DEFAULT (0x2AEF & ~LQ035_DRIVER_OUTPUT_MASK)
+
+#define LQ035_SHUT (1 << 0) /* Shutdown */
+#define LQ035_ON (0 << 0) /* Shutdown */
+
+#ifndef CONFIG_LQ035Q1_LCD_MODE
+#define CONFIG_LQ035Q1_LCD_MODE (LQ035_NORM | LQ035_RL | LQ035_TB | LQ035_BGR)
+#endif
+
+#else /* t350mcqb */
+#include <asm/bfin_logo_230x230.h>
+
+#define LCD_BPP 24 /* Bit Per Pixel */
+#define CLOCKS_PPIX 3 /* Clocks per pixel */
/* HS and VS timing parameters (all in number of PPI clk ticks) */
-#define H_ACTPIX (LCD_X_RES * CLOCKS_PER_PIX) /* active horizontal pixel */
-#define H_PERIOD (408 * CLOCKS_PER_PIX) /* HS period */
+#define H_ACTPIX (LCD_X_RES * CLOCKS_PPIX) /* active horizontal pixel */
+#define H_PERIOD (408 * CLOCKS_PPIX) /* HS period */
#define H_PULSE 90 /* HS pulse width */
#define H_START 204 /* first valid pixel */
#define U_LINE 1 /* Blanking Lines */
-#define V_LINES (LCD_Y_RES + U_LINE) /* total vertical lines */
+#define V_LINES (LCD_Y_RES + U_LINE) /* total vertical lines */
#define V_PULSE (3 * H_PERIOD) /* VS pulse width (1-5 H_PERIODs) */
#define V_PERIOD (H_PERIOD * V_LINES) /* VS period */
#define ACTIVE_VIDEO_MEM_OFFSET (U_LINE * H_ACTPIX)
+#endif
+
+#define LCD_PIXEL_SIZE (LCD_BPP / 8)
+#define DMA_SIZE16 2
#define PPI_TX_MODE 0x2
#define PPI_XFER_TYPE_11 0xC
@@ -53,6 +124,40 @@
#define PPI_PACK_EN 0x80
#define PPI_POLS_1 0x8000
+#ifdef CONFIG_MK_BF527_EZKIT_REV_2_1
+static struct spi_slave *slave;
+static int lq035q1_control(unsigned char reg, unsigned short value)
+{
+ int ret;
+ u8 regs[3] = {LQ035_INDEX, 0, 0};
+ u8 data[3] = {LQ035_DATA, 0, 0};
+ u8 dummy[3];
+
+ regs[2] = reg;
+ data[1] = value >> 8;
+ data[2] = value & 0xFF;
+
+ if (!slave) {
+ /* FIXME: Verify the max SCK rate */
+ slave = spi_setup_slave(CONFIG_LQ035Q1_SPI_BUS,
+ CONFIG_LQ035Q1_SPI_CS, 20000000,
+ SPI_MODE_3);
+ if (!slave)
+ return -1;
+ }
+
+ if (spi_claim_bus(slave))
+ return -1;
+
+ ret = spi_xfer(slave, 24, regs, dummy, SPI_XFER_BEGIN | SPI_XFER_END);
+ ret |= spi_xfer(slave, 24, data, dummy, SPI_XFER_BEGIN | SPI_XFER_END);
+
+ spi_release_bus(slave);
+
+ return ret;
+}
+#endif
+
/* enable and disable PPI functions */
void EnablePPI(void)
{
@@ -80,7 +185,7 @@ void Init_PPI(void)
*pPPI_DELAY = H_START;
*pPPI_COUNT = (H_ACTPIX-1);
- *pPPI_FRAME = 0;
+ *pPPI_FRAME = V_LINES;
/* PPI control, to be replaced with definitions */
*pPPI_CONTROL = PPI_TX_MODE | /* output mode , PORT_DIR */
@@ -188,9 +293,20 @@ void DisableTIMER1(void)
SSYNC();
}
+void EnableTIMER12(void)
+{
+ *pTIMER_ENABLE |= TIMEN1 | TIMEN0;
+ SSYNC();
+}
+
int video_init(void *dst)
{
+#ifdef CONFIG_MK_BF527_EZKIT_REV_2_1
+ lq035q1_control(LQ035_SHUT_CTL, LQ035_ON);
+ lq035q1_control(LQ035_DRIVER_OUTPUT_CTL, (CONFIG_LQ035Q1_LCD_MODE &
+ LQ035_DRIVER_OUTPUT_MASK) | LQ035_DRIVER_OUTPUT_DEFAULT);
+#endif
Init_Ports();
Init_DMA(dst);
EnableDMA();
@@ -199,6 +315,9 @@ int video_init(void *dst)
Init_PPI();
EnablePPI();
+#ifdef CONFIG_MK_BF527_EZKIT_REV_2_1
+ EnableTIMER12();
+#else
/* Frame sync 2 (VS) needs to start at least one PPI clk earlier */
EnableTIMER1();
/* Add Some Delay ... */
@@ -209,6 +328,7 @@ int video_init(void *dst)
/* now start frame sync 1 */
EnableTIMER0();
+#endif
return 0;
}
diff --git a/board/bf533-ezkit/bf533-ezkit.c b/board/bf533-ezkit/bf533-ezkit.c
index 8727dee..b1aa7b7 100644
--- a/board/bf533-ezkit/bf533-ezkit.c
+++ b/board/bf533-ezkit/bf533-ezkit.c
@@ -39,13 +39,6 @@ int checkboard(void)
return 0;
}
-phys_size_t initdram(int board_type)
-{
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_MAX_RAM_SIZE;
- return gd->bd->bi_memsize;
-}
-
/* miscellaneous platform dependent initialisations */
int misc_init_r(void)
{
diff --git a/board/bf533-stamp/Makefile b/board/bf533-stamp/Makefile
index dbba12b..832037b 100644
--- a/board/bf533-stamp/Makefile
+++ b/board/bf533-stamp/Makefile
@@ -30,6 +30,7 @@ include $(TOPDIR)/config.mk
LIB = $(obj)lib$(BOARD).a
COBJS-y := $(BOARD).o
+COBJS-$(CONFIG_STAMP_CF) += ide-cf.o
COBJS-$(CONFIG_VIDEO) += video.o
SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
diff --git a/board/bf533-stamp/bf533-stamp.c b/board/bf533-stamp/bf533-stamp.c
index a226910..4abad08 100644
--- a/board/bf533-stamp/bf533-stamp.c
+++ b/board/bf533-stamp/bf533-stamp.c
@@ -39,13 +39,6 @@ int checkboard(void)
return 0;
}
-phys_size_t initdram(int board_type)
-{
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_MAX_RAM_SIZE;
- return gd->bd->bi_memsize;
-}
-
/* PF0 and PF1 are used to switch between the ethernet and flash:
* PF0 PF1
* flash: 0 0
@@ -69,118 +62,11 @@ void swap_to(int device_id)
/* miscellaneous platform dependent initialisations */
int misc_init_r(void)
{
- int i;
- int cf_stat = 0;
-
- /* Check whether CF card is inserted */
- *pFIO_EDGE = FIO_EDGE_CF_BITS;
- *pFIO_POLAR = FIO_POLAR_CF_BITS;
- for (i = 0; i < 0x300; i++)
- asm("nop;");
-
- if ((*pFIO_FLAG_S) & CF_STAT_BITS) {
- cf_stat = 0;
- } else {
- cf_stat = 1;
- }
-
- *pFIO_EDGE = FIO_EDGE_BITS;
- *pFIO_POLAR = FIO_POLAR_BITS;
-
- if (cf_stat) {
- printf("Booting from COMPACT flash\n");
-
- for (i = 0; i < 0x1000; i++)
- asm("nop;");
- for (i = 0; i < 0x1000; i++)
- asm("nop;");
- for (i = 0; i < 0x1000; i++)
- asm("nop;");
-
- serial_setbrg();
- ide_init();
-
- setenv("bootargs", "");
- setenv("bootcmd",
- "fatload ide 0:1 0x1000000 uImage-stamp;bootm 0x1000000;bootm 0x20100000");
- } else {
- printf("Booting from FLASH\n");
- }
-
- return 0;
-}
-#endif
-
#ifdef CONFIG_STAMP_CF
+ cf_ide_init();
+#endif
-void cf_outb(unsigned char val, volatile unsigned char *addr)
-{
- /*
- * Set PF1 PF0 respectively to 0 1 to divert address
- * to the expansion memory banks
- */
- *pFIO_FLAG_S = CF_PF0;
- *pFIO_FLAG_C = CF_PF1;
- SSYNC();
-
- *(addr) = val;
- SSYNC();
-
- /* Setback PF1 PF0 to 0 0 to address external
- * memory banks */
- *(volatile unsigned short *)pFIO_FLAG_C = CF_PF1_PF0;
- SSYNC();
-}
-
-unsigned char cf_inb(volatile unsigned char *addr)
-{
- volatile unsigned char c;
-
- *pFIO_FLAG_S = CF_PF0;
- *pFIO_FLAG_C = CF_PF1;
- SSYNC();
-
- c = *(addr);
- SSYNC();
-
- *pFIO_FLAG_C = CF_PF1_PF0;
- SSYNC();
-
- return c;
-}
-
-void cf_insw(unsigned short *sect_buf, unsigned short *addr, int words)
-{
- int i;
-
- *pFIO_FLAG_S = CF_PF0;
- *pFIO_FLAG_C = CF_PF1;
- SSYNC();
-
- for (i = 0; i < words; i++) {
- *(sect_buf + i) = *(addr);
- SSYNC();
- }
-
- *pFIO_FLAG_C = CF_PF1_PF0;
- SSYNC();
-}
-
-void cf_outsw(unsigned short *addr, unsigned short *sect_buf, int words)
-{
- int i;
-
- *pFIO_FLAG_S = CF_PF0;
- *pFIO_FLAG_C = CF_PF1;
- SSYNC();
-
- for (i = 0; i < words; i++) {
- *(addr) = *(sect_buf + i);
- SSYNC();
- }
-
- *pFIO_FLAG_C = CF_PF1_PF0;
- SSYNC();
+ return 0;
}
#endif
diff --git a/board/bf533-stamp/ide-cf.c b/board/bf533-stamp/ide-cf.c
new file mode 100644
index 0000000..23e786b
--- /dev/null
+++ b/board/bf533-stamp/ide-cf.c
@@ -0,0 +1,90 @@
+/*
+ * CF IDE addon card code
+ *
+ * Enter bugs at http://blackfin.uclinux.org/
+ *
+ * Copyright (c) 2005-2009 Analog Devices Inc.
+ *
+ * Licensed under the GPL-2 or later.
+ */
+
+#include <common.h>
+#include <config.h>
+#include <asm/blackfin.h>
+#include "bf533-stamp.h"
+
+void cf_outb(unsigned char val, volatile unsigned char *addr)
+{
+ /* "ETHERNET" means the expansion memory banks */
+ swap_to(ETHERNET);
+
+ *addr = val;
+ SSYNC();
+
+ swap_to(FLASH);
+}
+
+unsigned char cf_inb(volatile unsigned char *addr)
+{
+ unsigned char c;
+
+ swap_to(ETHERNET);
+
+ c = *addr;
+ SSYNC();
+
+ swap_to(FLASH);
+
+ return c;
+}
+
+void cf_insw(unsigned short *sect_buf, unsigned short *addr, int words)
+{
+ int i;
+
+ swap_to(ETHERNET);
+
+ for (i = 0; i < words; i++) {
+ *(sect_buf + i) = *addr;
+ SSYNC();
+ }
+
+ swap_to(FLASH);
+}
+
+void cf_outsw(unsigned short *addr, unsigned short *sect_buf, int words)
+{
+ int i;
+
+ swap_to(ETHERNET);
+
+ for (i = 0; i < words; i++) {
+ *addr = *(sect_buf + i);
+ SSYNC();
+ }
+
+ swap_to(FLASH);
+}
+
+void cf_ide_init(void)
+{
+ int i, cf_stat;
+
+ /* Check whether CF card is inserted */
+ bfin_write_FIO_EDGE(FIO_EDGE_CF_BITS);
+ bfin_write_FIO_POLAR(FIO_POLAR_CF_BITS);
+ for (i = 0; i < 0x300; i++)
+ asm volatile("nop;");
+
+ cf_stat = bfin_read_FIO_FLAG_S() & CF_STAT_BITS;
+
+ bfin_write_FIO_EDGE(FIO_EDGE_BITS);
+ bfin_write_FIO_POLAR(FIO_POLAR_BITS);
+
+ if (!cf_stat) {
+ for (i = 0; i < 0x3000; i++)
+ asm volatile("nop;");
+
+ ide_init();
+ }
+}
diff --git a/board/bf537-minotaur/bf537-minotaur.c b/board/bf537-minotaur/bf537-minotaur.c
index 71b452a..920429c 100644
--- a/board/bf537-minotaur/bf537-minotaur.c
+++ b/board/bf537-minotaur/bf537-minotaur.c
@@ -23,13 +23,6 @@ int checkboard(void)
return 0;
}
-phys_size_t initdram(int board_type)
-{
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_MAX_RAM_SIZE;
- return gd->bd->bi_memsize;
-}
-
#ifdef CONFIG_BFIN_MAC
static void board_init_enetaddr(uchar *mac_addr)
{
diff --git a/board/bf537-pnav/bf537-pnav.c b/board/bf537-pnav/bf537-pnav.c
index 12cfefa..c512528 100644
--- a/board/bf537-pnav/bf537-pnav.c
+++ b/board/bf537-pnav/bf537-pnav.c
@@ -23,13 +23,6 @@ int checkboard(void)
return 0;
}
-phys_size_t initdram(int board_type)
-{
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_MAX_RAM_SIZE;
- return gd->bd->bi_memsize;
-}
-
#ifdef CONFIG_BFIN_MAC
static void board_init_enetaddr(uchar *mac_addr)
{
diff --git a/board/bf537-srv1/bf537-srv1.c b/board/bf537-srv1/bf537-srv1.c
index 5ad39cc..04d3891 100644
--- a/board/bf537-srv1/bf537-srv1.c
+++ b/board/bf537-srv1/bf537-srv1.c
@@ -23,13 +23,6 @@ int checkboard(void)
return 0;
}
-phys_size_t initdram(int board_type)
-{
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_MAX_RAM_SIZE;
- return gd->bd->bi_memsize;
-}
-
#ifdef CONFIG_BFIN_MAC
static void board_init_enetaddr(uchar *mac_addr)
{
diff --git a/board/bf537-stamp/bf537-stamp.c b/board/bf537-stamp/bf537-stamp.c
index 28597c9..3911be6 100644
--- a/board/bf537-stamp/bf537-stamp.c
+++ b/board/bf537-stamp/bf537-stamp.c
@@ -43,13 +43,6 @@ int checkboard(void)
return 0;
}
-phys_size_t initdram(int board_type)
-{
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_MAX_RAM_SIZE;
- return gd->bd->bi_memsize;
-}
-
void board_reset(void)
{
/* workaround for weak pull ups on ssel */
diff --git a/board/bf538f-ezkit/bf538f-ezkit.c b/board/bf538f-ezkit/bf538f-ezkit.c
index 15916fa..49d30e7 100644
--- a/board/bf538f-ezkit/bf538f-ezkit.c
+++ b/board/bf538f-ezkit/bf538f-ezkit.c
@@ -20,13 +20,6 @@ int checkboard(void)
return 0;
}
-phys_size_t initdram(int board_type)
-{
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_MAX_RAM_SIZE;
- return gd->bd->bi_memsize;
-}
-
#ifdef CONFIG_SMC91111
int board_eth_init(bd_t *bis)
{
diff --git a/board/bf548-ezkit/bf548-ezkit.c b/board/bf548-ezkit/bf548-ezkit.c
index 88a0cd4..65fb81a 100644
--- a/board/bf548-ezkit/bf548-ezkit.c
+++ b/board/bf548-ezkit/bf548-ezkit.c
@@ -11,6 +11,7 @@
#include <config.h>
#include <command.h>
#include <asm/blackfin.h>
+#include <asm/sdh.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -21,13 +22,6 @@ int checkboard(void)
return 0;
}
-phys_size_t initdram(int board_type)
-{
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_MAX_RAM_SIZE;
- return gd->bd->bi_memsize;
-}
-
int board_early_init_f(void)
{
/* Port H: PH8 - PH13 == A4 - A9
@@ -85,3 +79,26 @@ int board_eth_init(bd_t *bis)
return smc911x_initialize(0, CONFIG_SMC911X_BASE);
}
#endif
+
+#ifdef CONFIG_BFIN_SDH
+int board_mmc_init(bd_t *bis)
+{
+ return bfin_mmc_init(bis);
+}
+#endif
+
+#ifdef CONFIG_USB_BLACKFIN
+void board_musb_init(void)
+{
+ /*
+ * Rev 1.0 BF549 EZ-KITs require PE7 to be high for both device
+ * and OTG host modes, while rev 1.1 and greater require PE7 to
+ * be low for device mode and high for host mode. We set it high
+ * here because we are in host mode.
+ */
+ bfin_write_PORTE_FER(bfin_read_PORTE_FER() & ~PE7);
+ bfin_write_PORTE_DIR_SET(PE7);
+ bfin_write_PORTE_SET(PE7);
+ SSYNC();
+}
+#endif
diff --git a/board/bf561-acvilon/Makefile b/board/bf561-acvilon/Makefile
new file mode 100644
index 0000000..cc039a0
--- /dev/null
+++ b/board/bf561-acvilon/Makefile
@@ -0,0 +1,56 @@
+#
+# U-boot - Makefile
+#
+# Copyright (c) 2005-2007 Analog Device Inc.
+#
+# (C) Copyright 2000-2006
+# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+#
+# (C) Copyright 2009 CJSC "NII STT", Russia, Smolensk
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB = $(obj)lib$(BOARD).a
+
+COBJS-y := $(BOARD).o
+
+SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS-y))
+SOBJS := $(addprefix $(obj),$(SOBJS-y))
+
+$(LIB): $(obj).depend $(OBJS) $(SOBJS)
+ $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
+clean:
+ rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+ rm -f $(LIB) core *.bak $(obj).depend
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
diff --git a/board/bf561-acvilon/bf561-acvilon.c b/board/bf561-acvilon/bf561-acvilon.c
new file mode 100644
index 0000000..483758e
--- /dev/null
+++ b/board/bf561-acvilon/bf561-acvilon.c
@@ -0,0 +1,51 @@
+/*
+ * File: board/bf561-acvilon/bf561-acvilon.c
+ * Based on: board/bf561-ezkit/bf561-ezkit.c
+ * Author:
+ *
+ * Created: 2009-06-23
+ * Description: Acvilon System On Module board file
+ *
+ * Modified:
+ * Copyright 2009 CJSC "NII STT", http://www.niistt.ru/
+ * Copyright (c) 2005-2008 Analog Devices Inc.
+ *
+ * (C) Copyright 2000-2004
+ * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+ *
+ * Bugs:
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see the file COPYING, or write
+ * to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <common.h>
+#include <netdev.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int checkboard(void)
+{
+ printf("Board: CJSC \"NII STT\"-=Acvilon Platform=- [U-Boot]\n");
+ printf(" Support: http://www.niistt.ru/\n");
+ return 0;
+}
+
+#ifdef CONFIG_SMC911X
+int board_eth_init(bd_t *bis)
+{
+ return smc911x_initialize(0, CONFIG_SMC911X_BASE);
+}
+#endif
diff --git a/board/bf561-acvilon/config.mk b/board/bf561-acvilon/config.mk
new file mode 100644
index 0000000..cfad21a
--- /dev/null
+++ b/board/bf561-acvilon/config.mk
@@ -0,0 +1,34 @@
+#
+# Copyright (c) 2005-2008 Analog Device Inc.
+#
+# (C) Copyright 2001
+# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+# This is not actually used for Blackfin boards so do not change it
+#TEXT_BASE = do-not-use-me
+
+CFLAGS_lib_generic += -O2
+CFLAGS_lzma += -O2
+
+# Set some default LDR flags based on boot mode.
+LDR_FLAGS-BFIN_BOOT_PARA := --bits 16
+LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
diff --git a/board/bf561-ezkit/bf561-ezkit.c b/board/bf561-ezkit/bf561-ezkit.c
index e5d7eb3..b2411b6 100644
--- a/board/bf561-ezkit/bf561-ezkit.c
+++ b/board/bf561-ezkit/bf561-ezkit.c
@@ -38,13 +38,6 @@ int checkboard(void)
return 0;
}
-phys_size_t initdram(int board_type)
-{
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_MAX_RAM_SIZE;
- return gd->bd->bi_memsize;
-}
-
#ifdef CONFIG_SMC91111
int board_eth_init(bd_t *bis)
{
diff --git a/board/blackstamp/blackstamp.c b/board/blackstamp/blackstamp.c
index f55ab97..6355c10 100644
--- a/board/blackstamp/blackstamp.c
+++ b/board/blackstamp/blackstamp.c
@@ -24,13 +24,6 @@ int checkboard(void)
return 0;
}
-phys_size_t initdram(int board_type)
-{
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_MAX_RAM_SIZE;
- return gd->bd->bi_memsize;
-}
-
#ifdef SHARED_RESOURCES
void swap_to(int device_id)
{
diff --git a/board/cm-bf527/cm-bf527.c b/board/cm-bf527/cm-bf527.c
index db1cf90..b6815b1 100644
--- a/board/cm-bf527/cm-bf527.c
+++ b/board/cm-bf527/cm-bf527.c
@@ -24,13 +24,6 @@ int checkboard(void)
return 0;
}
-phys_size_t initdram(int board_type)
-{
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_MAX_RAM_SIZE;
- return gd->bd->bi_memsize;
-}
-
#ifdef CONFIG_BFIN_MAC
static void board_init_enetaddr(uchar *mac_addr)
{
diff --git a/board/cm-bf533/cm-bf533.c b/board/cm-bf533/cm-bf533.c
index ab0bf3b..a863195 100644
--- a/board/cm-bf533/cm-bf533.c
+++ b/board/cm-bf533/cm-bf533.c
@@ -18,13 +18,6 @@ int checkboard(void)
return 0;
}
-phys_size_t initdram(int board_type)
-{
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_MAX_RAM_SIZE;
- return gd->bd->bi_memsize;
-}
-
#ifdef CONFIG_SMC91111
int board_eth_init(bd_t *bis)
{
diff --git a/board/cm-bf537e/cm-bf537e.c b/board/cm-bf537e/cm-bf537e.c
index d1ca0a4..1e350dc 100644
--- a/board/cm-bf537e/cm-bf537e.c
+++ b/board/cm-bf537e/cm-bf537e.c
@@ -24,13 +24,6 @@ int checkboard(void)
return 0;
}
-phys_size_t initdram(int board_type)
-{
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_MAX_RAM_SIZE;
- return gd->bd->bi_memsize;
-}
-
#ifdef CONFIG_BFIN_MAC
static void board_init_enetaddr(uchar *mac_addr)
{
diff --git a/board/cm-bf537u/cm-bf537u.c b/board/cm-bf537u/cm-bf537u.c
index 9628e0f..92fa5a0 100644
--- a/board/cm-bf537u/cm-bf537u.c
+++ b/board/cm-bf537u/cm-bf537u.c
@@ -24,13 +24,6 @@ int checkboard(void)
return 0;
}
-phys_size_t initdram(int board_type)
-{
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_MAX_RAM_SIZE;
- return gd->bd->bi_memsize;
-}
-
#ifdef CONFIG_BFIN_MAC
static void board_init_enetaddr(uchar *mac_addr)
{
diff --git a/board/cm-bf548/cm-bf548.c b/board/cm-bf548/cm-bf548.c
index 796263d..3627586 100644
--- a/board/cm-bf548/cm-bf548.c
+++ b/board/cm-bf548/cm-bf548.c
@@ -21,13 +21,6 @@ int checkboard(void)
return 0;
}
-phys_size_t initdram(int board_type)
-{
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_MAX_RAM_SIZE;
- return gd->bd->bi_memsize;
-}
-
int board_early_init_f(void)
{
/* Port H: PH8 - PH13 == A4 - A9
diff --git a/board/cm-bf561/cm-bf561.c b/board/cm-bf561/cm-bf561.c
index f21a015..80cfff7 100644
--- a/board/cm-bf561/cm-bf561.c
+++ b/board/cm-bf561/cm-bf561.c
@@ -18,13 +18,6 @@ int checkboard(void)
return 0;
}
-phys_size_t initdram(int board_type)
-{
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_MAX_RAM_SIZE;
- return gd->bd->bi_memsize;
-}
-
#ifdef CONFIG_SMC91111
int board_eth_init(bd_t *bis)
{
diff --git a/board/ibf-dsp561/ibf-dsp561.c b/board/ibf-dsp561/ibf-dsp561.c
index 551fc29..b5bebd4 100644
--- a/board/ibf-dsp561/ibf-dsp561.c
+++ b/board/ibf-dsp561/ibf-dsp561.c
@@ -16,10 +16,3 @@ int checkboard(void)
printf(" Support: http://www.i-syst.com/\n");
return 0;
}
-
-phys_size_t initdram(int board_type)
-{
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_MAX_RAM_SIZE;
- return gd->bd->bi_memsize;
-}
diff --git a/board/tcm-bf518/Makefile b/board/tcm-bf518/Makefile
new file mode 100644
index 0000000..f2bd2c2
--- /dev/null
+++ b/board/tcm-bf518/Makefile
@@ -0,0 +1,54 @@
+#
+# U-boot - Makefile
+#
+# Copyright (c) 2005-2008 Analog Device Inc.
+#
+# (C) Copyright 2000-2006
+# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB = $(obj)lib$(BOARD).a
+
+COBJS-y := $(BOARD).o
+
+SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS-y))
+SOBJS := $(addprefix $(obj),$(SOBJS-y))
+
+$(LIB): $(obj).depend $(OBJS) $(SOBJS)
+ $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
+clean:
+ rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+ rm -f $(LIB) core *.bak $(obj).depend
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
diff --git a/board/tcm-bf518/config.mk b/board/tcm-bf518/config.mk
new file mode 100644
index 0000000..f85bef5
--- /dev/null
+++ b/board/tcm-bf518/config.mk
@@ -0,0 +1,33 @@
+#
+# Copyright (c) 2005-2008 Analog Device Inc.
+#
+# (C) Copyright 2001
+# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+# This is not actually used for Blackfin boards so do not change it
+#TEXT_BASE = do-not-use-me
+
+CFLAGS_lib_generic += -O2
+CFLAGS_lzma += -O2
+
+# Set some default LDR flags based on boot mode.
+LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
diff --git a/board/tcm-bf518/tcm-bf518.c b/board/tcm-bf518/tcm-bf518.c
new file mode 100644
index 0000000..5964059
--- /dev/null
+++ b/board/tcm-bf518/tcm-bf518.c
@@ -0,0 +1,78 @@
+/*
+ * U-boot - main board file
+ *
+ * Copyright (c) 2008-2009 Analog Devices Inc.
+ *
+ * Licensed under the GPL-2 or later.
+ */
+
+#include <common.h>
+#include <config.h>
+#include <net.h>
+#include <netdev.h>
+#include <asm/blackfin.h>
+#include <asm/net.h>
+#include <asm/mach-common/bits/otp.h>
+#include <asm/sdh.h>
+
+int checkboard(void)
+{
+ printf("Board: Bluetechnix TCM-BF518 board\n");
+ printf(" Support: http://www.bluetechnix.com/\n");
+ printf(" http://blackfin.uclinux.org/\n");
+ return 0;
+}
+
+#if defined(CONFIG_BFIN_MAC)
+static void board_init_enetaddr(uchar *mac_addr)
+{
+ bool valid_mac = false;
+
+#if 0
+ /* the MAC is stored in OTP memory page 0xDF */
+ uint32_t ret;
+ uint64_t otp_mac;
+
+ ret = bfrom_OtpRead(0xDF, OTP_LOWER_HALF, &otp_mac);
+ if (!(ret & OTP_MASTER_ERROR)) {
+ uchar *otp_mac_p = (uchar *)&otp_mac;
+
+ for (ret = 0; ret < 6; ++ret)
+ mac_addr[ret] = otp_mac_p[5 - ret];
+
+ if (is_valid_ether_addr(mac_addr))
+ valid_mac = true;
+ }
+#endif
+
+ if (!valid_mac) {
+ puts("Warning: Generating 'random' MAC address\n");
+ bfin_gen_rand_mac(mac_addr);
+ }
+
+ eth_setenv_enetaddr("ethaddr", mac_addr);
+}
+
+int board_eth_init(bd_t *bis)
+{
+ return bfin_EMAC_initialize(bis);
+}
+#endif
+
+int misc_init_r(void)
+{
+#ifdef CONFIG_BFIN_MAC
+ uchar enetaddr[6];
+ if (!eth_getenv_enetaddr("ethaddr", enetaddr))
+ board_init_enetaddr(enetaddr);
+#endif
+
+ return 0;
+}
+
+#ifdef CONFIG_BFIN_SDH
+int board_mmc_init(bd_t *bis)
+{
+ return bfin_mmc_init(bis);
+}
+#endif
diff --git a/board/tcm-bf537/tcm-bf537.c b/board/tcm-bf537/tcm-bf537.c
index 573387d..60742df 100644
--- a/board/tcm-bf537/tcm-bf537.c
+++ b/board/tcm-bf537/tcm-bf537.c
@@ -24,13 +24,6 @@ int checkboard(void)
return 0;
}
-phys_size_t initdram(int board_type)
-{
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_MAX_RAM_SIZE;
- return gd->bd->bi_memsize;
-}
-
#ifdef CONFIG_BFIN_MAC
static void board_init_enetaddr(uchar *mac_addr)
{