diff options
author | Wolfgang Denk <wd@denx.de> | 2012-06-07 23:34:11 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2012-06-07 23:34:11 +0200 |
commit | 76aef69e49318863cb9966f872a80ddb5586d666 (patch) | |
tree | f53fb2a645e9a0516e48aaefc862cdf6326fc528 /board/renesas/rsk7269/rsk7269.c | |
parent | 25315683fd2197b2ecec0ac05427cbdebfb88274 (diff) | |
parent | 99fc4fd168f2eff3237f05c6ec4e2bbffe9c06e5 (diff) | |
download | u-boot-imx-76aef69e49318863cb9966f872a80ddb5586d666.zip u-boot-imx-76aef69e49318863cb9966f872a80ddb5586d666.tar.gz u-boot-imx-76aef69e49318863cb9966f872a80ddb5586d666.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-sh
* 'master' of git://git.denx.de/u-boot-sh:
sh/ap_sh4a_4a: Fix typo of operator in ET0_ETXD4
sh: Add SH7269 device and RSK2+SH7269 board
sh: Set CONFIG_SH_ETHER_PHY_MODE and CONFIG_SH_ETHER_SH7734_MII to boards with sh_eth
sh: Add support for AP-SH4A-4A board
sh: Add register definition of PFC for SH7734
sh: r0p7734: Add support I2C controller
sh: Add bit control functions
sh: Add support for r0p7734 board
sh: Add support Renesas SH7734
Signed-off-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'board/renesas/rsk7269/rsk7269.c')
-rw-r--r-- | board/renesas/rsk7269/rsk7269.c | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/board/renesas/rsk7269/rsk7269.c b/board/renesas/rsk7269/rsk7269.c new file mode 100644 index 0000000..842a154 --- /dev/null +++ b/board/renesas/rsk7269/rsk7269.c @@ -0,0 +1,73 @@ +/* + * Copyright (C) 2012 Renesas Electronics Europe Ltd. + * Copyright (C) 2012 Phil Edworthy + * Copyright (C) 2008 Renesas Solutions Corp. + * Copyright (C) 2008 Nobuhiro Iwamatsu + * + * Based on u-boot/board/rsk7264/rsk7264.c + * + * This file is released under the terms of GPL v2 and any later version. + * See the file COPYING in the root directory of the source tree for details. + */ + +#include <common.h> +#include <net.h> +#include <netdev.h> +#include <asm/io.h> +#include <asm/processor.h> + +DECLARE_GLOBAL_DATA_PTR; + +int checkboard(void) +{ + puts("BOARD: Renesas RSK7269\n"); + return 0; +} + +int board_init(void) +{ + return 0; +} + +int dram_init(void) +{ + gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE; + gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE; + printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024)); + return 0; +} + +void led_set_state(unsigned short value) +{ +} + +/* + * The RSK board has the SMSC89218 wired up 'incorrectly'. + * Byte-swapping is necessary, and so poor performance is inevitable. + * This problem cannot evade by the swap function of CHIP, this can + * evade by software Byte-swapping. + * And this has problem by FIFO access only. pkt_data_pull/pkt_data_push + * functions necessary to solve this problem. + */ +u32 pkt_data_pull(struct eth_device *dev, u32 addr) +{ + volatile u16 *addr_16 = (u16 *)(dev->iobase + addr); + return (u32)((swab16(*addr_16) << 16) & 0xFFFF0000)\ + | swab16(*(addr_16 + 1)); +} + +void pkt_data_push(struct eth_device *dev, u32 addr, u32 val) +{ + addr += dev->iobase; + *(volatile u16 *)(addr + 2) = swab16((u16)val); + *(volatile u16 *)(addr) = swab16((u16)(val >> 16)); +} + +int board_eth_init(bd_t *bis) +{ + int rc = 0; +#ifdef CONFIG_SMC911X + rc = smc911x_initialize(0, CONFIG_SMC911X_BASE); +#endif + return rc; +} |