Introducing the Broadcom bcm281xx Architecture
Subsystems (6)
v2 cover Introducing the Broadcom bcm281xx Architecture
This patchset introduces the Broadcom bcm281xx family of mobile SoC chips. Broadcom kona hardware blocks are often found in Broadcom mobile SoC chips including the bcm281xx family, so support for some of these kona blocks is also provided here. These patches work on u-boot master as well as the u-boot-arm custodian tree.
v2 changes
----------
Delete lowlevel_init.S and create s_init.c. File header cleanup, cosmetic changes, dead code removal. Create include/bitfield.h. Use get_ram_size(). Use weak timer_init(); Skip lowlevel init. Remove memory test config. Use standard baud table and prompt.
Darwin Rambo (6):
arch: kona: Initial commit of kona-common architecture code
arch: bcm281xx: Initial commit of bcm281xx architecture code
gpio: kona: Add Kona gpio driver
i2c: kona: Add Kona I2C driver
mmc: kona: Add Kona mmc driver
board: bcm28155_ap: Add board files
arch/arm/cpu/armv7/Makefile | 1 + arch/arm/cpu/armv7/bcm281xx/Makefile | 11 + arch/arm/cpu/armv7/bcm281xx/clk-bcm281xx.c | 523 +++++++++++++++++ arch/arm/cpu/armv7/bcm281xx/clk-bsc.c | 52 ++ arch/arm/cpu/armv7/bcm281xx/clk-core.c | 513 +++++++++++++++++ arch/arm/cpu/armv7/bcm281xx/clk-core.h | 495 ++++++++++++++++ arch/arm/cpu/armv7/bcm281xx/clk-sdio.c | 73 +++ arch/arm/cpu/armv7/bcm281xx/reset.c | 27 + arch/arm/cpu/armv7/kona-common/Makefile | 9 + arch/arm/cpu/armv7/kona-common/clk-stubs.c | 21 + arch/arm/cpu/armv7/kona-common/hwinit-common.c | 16 + arch/arm/cpu/armv7/kona-common/s_init.c | 12 + arch/arm/include/asm/arch-bcm281xx/gpio.h | 15 + arch/arm/include/asm/arch-bcm281xx/sysmap.h | 25 + arch/arm/include/asm/kona-common/clk.h | 29 + arch/arm/include/asm/kona-common/kona_sdhci.h | 12 + board/broadcom/bcm28155_ap/Makefile | 7 + board/broadcom/bcm28155_ap/bcm28155_ap.c | 87 +++ boards.cfg | 1 + drivers/gpio/Makefile | 1 + drivers/gpio/kona_gpio.c | 141 +++++ drivers/i2c/Makefile | 1 + drivers/i2c/kona_i2c.c | 730 ++++++++++++++++++++++++ drivers/mmc/Makefile | 1 + drivers/mmc/kona_sdhci.c | 125 ++++ include/bitfield.h | 56 ++ include/configs/bcm28155_ap.h | 140 +++++ 27 files changed, 3124 insertions(+) create mode 100644 arch/arm/cpu/armv7/bcm281xx/Makefile create mode 100644 arch/arm/cpu/armv7/bcm281xx/clk-bcm281xx.c create mode 100644 arch/arm/cpu/armv7/bcm281xx/clk-bsc.c create mode 100644 arch/arm/cpu/armv7/bcm281xx/clk-core.c create mode 100644 arch/arm/cpu/armv7/bcm281xx/clk-core.h create mode 100644 arch/arm/cpu/armv7/bcm281xx/clk-sdio.c create mode 100644 arch/arm/cpu/armv7/bcm281xx/reset.c create mode 100644 arch/arm/cpu/armv7/kona-common/Makefile create mode 100644 arch/arm/cpu/armv7/kona-common/clk-stubs.c create mode 100644 arch/arm/cpu/armv7/kona-common/hwinit-common.c create mode 100644 arch/arm/cpu/armv7/kona-common/s_init.c create mode 100644 arch/arm/include/asm/arch-bcm281xx/gpio.h create mode 100644 arch/arm/include/asm/arch-bcm281xx/sysmap.h create mode 100644 arch/arm/include/asm/kona-common/clk.h create mode 100644 arch/arm/include/asm/kona-common/kona_sdhci.h create mode 100644 board/broadcom/bcm28155_ap/Makefile create mode 100644 board/broadcom/bcm28155_ap/bcm28155_ap.c create mode 100644 drivers/gpio/kona_gpio.c create mode 100644 drivers/i2c/kona_i2c.c create mode 100644 drivers/mmc/kona_sdhci.c create mode 100644 include/bitfield.h create mode 100644 include/configs/bcm28155_ap.h
Signature · 1 line
1.7.9.5
PATCH v2 1/6 arch: kona: Initial commit of kona-common architecture code
The Kona architecture is present on a number of Broadcom mobile SoCs including the bcm281xx family of chips.
--- arch/arm/cpu/armv7/Makefile | 1 + arch/arm/cpu/armv7/kona-common/Makefile | 9 ++++++++ arch/arm/cpu/armv7/kona-common/clk-stubs.c | 21 +++++++++++++++++ arch/arm/cpu/armv7/kona-common/hwinit-common.c | 16 +++++++++++++ arch/arm/cpu/armv7/kona-common/s_init.c | 12 ++++++++++ arch/arm/include/asm/kona-common/clk.h | 29 ++++++++++++++++++++++++ arch/arm/include/asm/kona-common/kona_sdhci.h | 12 ++++++++++ 7 files changed, 100 insertions(+) create mode 100644 arch/arm/cpu/armv7/kona-common/Makefile create mode 100644 arch/arm/cpu/armv7/kona-common/clk-stubs.c create mode 100644 arch/arm/cpu/armv7/kona-common/hwinit-common.c create mode 100644 arch/arm/cpu/armv7/kona-common/s_init.c create mode 100644 arch/arm/include/asm/kona-common/clk.h create mode 100644 arch/arm/include/asm/kona-common/kona_sdhci.h
arch/arm/cpu/armv7/Makefile +1 -0
@@ -23,6 +23,7 @@ obj-y += nonsec_virt.o obj-y += virt-v7.o endif +obj-$(CONFIG_KONA) += kona-common/ obj-$(CONFIG_OMAP_COMMON) += omap-common/ obj-$(CONFIG_TEGRA) += tegra-common/
arch/arm/cpu/armv7/kona-common/Makefile new file +9 -0
@@ -0,0 +1,9 @@ +# +# Copyright 2013 Broadcom Corporation. All rights reserved. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += s_init.o +obj-y += hwinit-common.o +obj-y += clk-stubs.o
arch/arm/cpu/armv7/kona-common/clk-stubs.c new file +21 -0
@@ -0,0 +1,21 @@ +/* +* Copyright 2013 Broadcom Corporation. All rights reserved. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#include <common.h> + +/* +* These weak functions are available to kona architectures that don't +* require clock enables from the driver code. +*/ +int __weak clk_sdio_enable (void *base,u32 rate,u32 *actual_ratep) +{ +return 0 ; +} + +int __weak clk_bsc_enable (void *base,u32 rate,u32 *actual_ratep) +{ +return 0 ; +}
arch/arm/cpu/armv7/kona-common/hwinit-common.c new file +16 -0
@@ -0,0 +1,16 @@ +/* +* Copyright 2013 Broadcom Corporation. All rights reserved. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#include <common.h> +#include <asm/sizes.h> + +#ifndef CONFIG_SYS_DCACHE_OFF +void enable_caches (void ) +{ +/* Enable D-cache. I-cache is already enabled in start.S */ +dcache_enable (); +} +#endif
arch/arm/cpu/armv7/kona-common/s_init.c new file +12 -0
@@ -0,0 +1,12 @@ +/* +* System init +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +/* +* Early system init. Currently empty. +*/ +void s_init (void ) +{ +}
arch/arm/include/asm/kona-common/clk.h new file +29 -0
@@ -0,0 +1,29 @@ +/* +* Copyright 2013 Broadcom Corporation. All rights reserved. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +/* This API file is loosely based on u-boot/drivers/video/ipu.h and linux */ + +#ifndef __KONA_COMMON_CLK_H +#define __KONA_COMMON_CLK_H + +#include <linux/types.h> + +struct clk ; + +/* Only implement required functions for your specific architecture */ +int clk_init (void ); +struct clk *clk_get (const char *id); +int clk_enable (struct clk *clk); +void clk_disable (struct clk *clk); +unsigned long clk_get_rate (struct clk *clk); +long clk_round_rate (struct clk *clk,unsigned long rate); +int clk_set_rate (struct clk *clk,unsigned long rate); +int clk_set_parent (struct clk *clk,struct clk *parent); +struct clk *clk_get_parent (struct clk *clk); +int clk_sdio_enable (void *base,u32 rate,u32 *actual_ratep); +int clk_bsc_enable (void *base); + +#endif
arch/arm/include/asm/kona-common/kona_sdhci.h new file +12 -0
@@ -0,0 +1,12 @@ +/* +* Copyright 2013 Broadcom Corporation. All rights reserved. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef __KONA_SDHCI_H +#define __KONA_SDHCI_H + +int kona_sdhci_init (int dev_index,u32 min_clk,u32 quirks); + +#endif
Signature · 1 line
1.7.9.5
PATCH v2 2/6 arch: bcm281xx: Initial commit of bcm281xx architecture code
In reply to Darwin RamboAdd bcm281xx architecture support code including a clock framework and chip reset. Define register block base addresses for the bcm281xx architecture and create an empty gpio header file required when CONFIG_CMD_GPIO is set.
--- arch/arm/cpu/armv7/bcm281xx/Makefile | 11 + arch/arm/cpu/armv7/bcm281xx/clk-bcm281xx.c | 523 +++++++++++++++++++++++++++ arch/arm/cpu/armv7/bcm281xx/clk-bsc.c | 52 +++ arch/arm/cpu/armv7/bcm281xx/clk-core.c | 513 ++++++++++++++++++++++++++ arch/arm/cpu/armv7/bcm281xx/clk-core.h | 495 +++++++++++++++++++++++++ arch/arm/cpu/armv7/bcm281xx/clk-sdio.c | 73 ++++ arch/arm/cpu/armv7/bcm281xx/reset.c | 27 ++ arch/arm/include/asm/arch-bcm281xx/gpio.h | 15 + arch/arm/include/asm/arch-bcm281xx/sysmap.h | 25 ++ include/bitfield.h | 56 +++ 10 files changed, 1790 insertions(+) create mode 100644 arch/arm/cpu/armv7/bcm281xx/Makefile create mode 100644 arch/arm/cpu/armv7/bcm281xx/clk-bcm281xx.c create mode 100644 arch/arm/cpu/armv7/bcm281xx/clk-bsc.c create mode 100644 arch/arm/cpu/armv7/bcm281xx/clk-core.c create mode 100644 arch/arm/cpu/armv7/bcm281xx/clk-core.h create mode 100644 arch/arm/cpu/armv7/bcm281xx/clk-sdio.c create mode 100644 arch/arm/cpu/armv7/bcm281xx/reset.c create mode 100644 arch/arm/include/asm/arch-bcm281xx/gpio.h create mode 100644 arch/arm/include/asm/arch-bcm281xx/sysmap.h create mode 100644 include/bitfield.h
arch/arm/cpu/armv7/bcm281xx/Makefile new file +11 -0
@@ -0,0 +1,11 @@ +# +# Copyright 2013 Broadcom Corporation. All rights reserved. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += reset.o +obj-y += clk-core.o +obj-y += clk-bcm281xx.o +obj-y += clk-sdio.o +obj-y += clk-bsc.o
arch/arm/cpu/armv7/bcm281xx/clk-bcm281xx.c new file +523 -0
523 lines not on this page · raw message
arch/arm/cpu/armv7/bcm281xx/clk-bsc.c new file +52 -0
52 lines not on this page · raw message
arch/arm/cpu/armv7/bcm281xx/clk-core.c new file +513 -0
513 lines not on this page · raw message
arch/arm/cpu/armv7/bcm281xx/clk-core.h new file +495 -0
495 lines not on this page · raw message
arch/arm/cpu/armv7/bcm281xx/clk-sdio.c new file +73 -0
73 lines not on this page · raw message
arch/arm/cpu/armv7/bcm281xx/reset.c new file +27 -0
@@ -0,0 +1,27 @@ +/* +* Copyright 2013 Broadcom Corporation. All rights reserved. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#include <common.h> +#include <asm/io.h> +#include <asm/arch/sysmap.h> + +#define EN_MASK 0x08000000/* Enable timer */ +#define SRSTEN_MASK 0x04000000/* Enable soft reset */ +#define CLKS_SHIFT 20/* Clock period shift */ +#define LD_SHIFT 0/* Reload value shift */ + +void reset_cpu (ulong ignored) +{ +/* +* Set WD enable, RST enable, +* 3.9 msec clock period (8), reload value (8*3.9ms) +*/ +u32 reg =EN_MASK +SRSTEN_MASK + (8 <<CLKS_SHIFT ) + (8 <<LD_SHIFT ); +writel (reg,SECWD2_BASE_ADDR ); + +while (1 ) + ;/* loop forever till reset */ +}
arch/arm/include/asm/arch-bcm281xx/gpio.h new file +15 -0
@@ -0,0 +1,15 @@ +/* +* Copyright 2013 Broadcom Corporation. All rights reserved. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef __ARCH_BCM281XX_GPIO_H +#define __ARCH_BCM281XX_GPIO_H + +/* +* Empty file - cmd_gpio.c requires this. The implementation +* is in drivers/gpio/kona_gpio.c instead of inlined here. +*/ + +#endif
arch/arm/include/asm/arch-bcm281xx/sysmap.h new file +25 -0
@@ -0,0 +1,25 @@ +/* +* Copyright 2013 Broadcom Corporation. All rights reserved. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef __ARCH_BCM281XX_SYSMAP_H + +#define BSC1_BASE_ADDR 0x3e016000 +#define BSC2_BASE_ADDR 0x3e017000 +#define BSC3_BASE_ADDR 0x3e018000 +#define GPIO2_BASE_ADDR 0x35003000 +#define KONA_MST_CLK_BASE_ADDR 0x3f001000 +#define KONA_SLV_CLK_BASE_ADDR 0x3e011000 +#define PMU_BSC_BASE_ADDR 0x3500d000 +#define PWRMGR_BASE_ADDR 0x35010000 +#define SDIO1_BASE_ADDR 0x3f180000 +#define SDIO2_BASE_ADDR 0x3f190000 +#define SDIO3_BASE_ADDR 0x3f1a0000 +#define SDIO4_BASE_ADDR 0x3f1b0000 +#define SECWD_BASE_ADDR 0x3500c000 +#define SECWD2_BASE_ADDR 0x35002f40 +#define TIMER_BASE_ADDR 0x3e00d000 + +#endif
include/bitfield.h new file +56 -0
56 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v2 3/6 gpio: kona: Add Kona gpio driver
In reply to Darwin RamboAdd support for the Kona GPIO controller found on Broadcom mobile SoCs.
--- drivers/gpio/Makefile | 1 + drivers/gpio/kona_gpio.c | 141 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 142 insertions(+) create mode 100644 drivers/gpio/kona_gpio.c
drivers/gpio/Makefile +1 -0
@@ -8,6 +8,7 @@ obj-$(CONFIG_AT91_GPIO) += at91_gpio.o obj-$(CONFIG_INTEL_ICH6_GPIO) += intel_ich6_gpio.o obj-$(CONFIG_KIRKWOOD_GPIO) += kw_gpio.o +obj-$(CONFIG_KONA_GPIO) += kona_gpio.o obj-$(CONFIG_MARVELL_GPIO) += mvgpio.o obj-$(CONFIG_MARVELL_MFP) += mvmfp.o obj-$(CONFIG_MXC_GPIO) += mxc_gpio.o
drivers/gpio/kona_gpio.c new file +141 -0
141 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v2 4/6 i2c: kona: Add Kona I2C driver
In reply to Darwin RamboAdd support for the Kona I2C controller found on Broadcom mobile SoCs.
--- drivers/i2c/Makefile | 1 + drivers/i2c/kona_i2c.c | 730 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 731 insertions(+) create mode 100644 drivers/i2c/kona_i2c.c
drivers/i2c/Makefile +1 -0
@@ -18,6 +18,7 @@ obj-$(CONFIG_SH_SH7734_I2C) += sh_sh7734_i2c.o obj-$(CONFIG_SYS_I2C) += i2c_core.o obj-$(CONFIG_SYS_I2C_FSL) += fsl_i2c.o obj-$(CONFIG_SYS_I2C_FTI2C010) += fti2c010.o +obj-$(CONFIG_SYS_I2C_KONA) += kona_i2c.o obj-$(CONFIG_SYS_I2C_MXC) += mxc_i2c.o obj-$(CONFIG_SYS_I2C_OMAP24XX) += omap24xx_i2c.o obj-$(CONFIG_SYS_I2C_OMAP34XX) += omap24xx_i2c.o
drivers/i2c/kona_i2c.c new file +730 -0
730 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v2 4/6 i2c: kona: Add Kona I2C driver
Hello Darwin,
Am 03.02.2014 23:12, schrieb Darwin Rambo:
Quoted 6 lines
Add support for the Kona I2C controller found on Broadcom mobile SoCs.
Signed-off-by Darwin Rambo<[email protected]>Reviewed-by Steve Rae<[email protected]>Reviewed-by Tim Kryger<[email protected]>---
What has changed in the v2 of your patch?
Quoted 4 lines
drivers/i2c/Makefile | 1 + drivers/i2c/kona_i2c.c | 730 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 731 insertions(+)create mode 100644
drivers/i2c/kona_i2c.c
[...]
Quoted 169 lines
drivers/i2c/kona_i2c.c new file +163
-0@@ -0,0 +1,730 @@ +/* +* Copyright 2013 Broadcom Corporation. All rights reserved. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#include <common.h> +#include <asm/io.h> +#include <asm/errno.h> +#include <asm/arch/sysmap.h> +#include <asm/kona-common/clk.h> +#include <i2c.h> + +/* Hardware register offsets and field defintions */ +#define CS_OFFSET 0x00000020 +#define CS_ACK_SHIFT 3 +#define CS_ACK_MASK 0x00000008 +#define CS_ACK_CMD_GEN_START 0x00000000 +#define CS_ACK_CMD_GEN_RESTART 0x00000001 +#define CS_CMD_SHIFT 1 +#define CS_CMD_CMD_NO_ACTION 0x00000000 +#define CS_CMD_CMD_START_RESTART 0x00000001 +#define CS_CMD_CMD_STOP 0x00000002 +#define CS_EN_SHIFT 0 +#define CS_EN_CMD_ENABLE_BSC 0x00000001 + +#define TIM_OFFSET 0x00000024 +#define TIM_PRESCALE_SHIFT 6 +#define TIM_P_SHIFT 3 +#define TIM_NO_DIV_SHIFT 2 +#define TIM_DIV_SHIFT 0 + +#define DAT_OFFSET 0x00000028 + +#define TOUT_OFFSET 0x0000002c + +#define TXFCR_OFFSET 0x0000003c +#define TXFCR_FIFO_FLUSH_MASK 0x00000080 +#define TXFCR_FIFO_EN_MASK 0x00000040 + +#define IER_OFFSET 0x00000044 +#define IER_READ_COMPLETE_INT_MASK 0x00000010 +#define IER_I2C_INT_EN_MASK 0x00000008 +#define IER_FIFO_INT_EN_MASK 0x00000002 +#define IER_NOACK_EN_MASK 0x00000001 + +#define ISR_OFFSET 0x00000048 +#define ISR_RESERVED_MASK 0xffffff60 +#define ISR_CMDBUSY_MASK 0x00000080 +#define ISR_READ_COMPLETE_MASK 0x00000010 +#define ISR_SES_DONE_MASK 0x00000008 +#define ISR_ERR_MASK 0x00000004 +#define ISR_TXFIFOEMPTY_MASK 0x00000002 +#define ISR_NOACK_MASK 0x00000001 + +#define CLKEN_OFFSET 0x0000004c +#define CLKEN_AUTOSENSE_OFF_MASK 0x00000080 +#define CLKEN_M_SHIFT 4 +#define CLKEN_N_SHIFT 1 +#define CLKEN_CLKEN_MASK 0x00000001 + +#define FIFO_STATUS_OFFSET 0x00000054 +#define FIFO_STATUS_RXFIFO_EMPTY_MASK 0x00000004 +#define FIFO_STATUS_TXFIFO_EMPTY_MASK 0x00000010 + +#define HSTIM_OFFSET 0x00000058 +#define HSTIM_HS_MODE_MASK 0x00008000 +#define HSTIM_HS_HOLD_SHIFT 10 +#define HSTIM_HS_HIGH_PHASE_SHIFT 5 +#define HSTIM_HS_SETUP_SHIFT 0 + +#define PADCTL_OFFSET 0x0000005c +#define PADCTL_PAD_OUT_EN_MASK 0x00000004 + +#define RXFCR_OFFSET 0x00000068 +#define RXFCR_NACK_EN_SHIFT 7 +#define RXFCR_READ_COUNT_SHIFT 0 +#define RXFIFORDOUT_OFFSET 0x0000006c + +/* Locally used constants */ +#define MAX_RX_FIFO_SIZE 64U/* bytes */ +#define MAX_TX_FIFO_SIZE 64U/* bytes */ + +#define I2C_TIMEOUT 100000/* usecs */ + +#define WAIT_INT_CHK 100/* usecs */ +#if I2C_TIMEOUT %WAIT_INT_CHK +#error I2C_TIMEOUT must be a multiple of WAIT_INT_CHK +#endif + +/* Operations that can be commanded to the controller */ +enum bcm_kona_cmd_t { +BCM_CMD_NOACTION =0 , +BCM_CMD_START , +BCM_CMD_RESTART , +BCM_CMD_STOP , +}; + +enum bus_speed_index { +BCM_SPD_100K =0 , +BCM_SPD_400K , +BCM_SPD_1MHZ , +}; + +/* Internal divider settings for standard mode, fast mode and fast mode plus */ +struct bus_speed_cfg { +uint8_t time_m;/* Number of cycles for setup time */ +uint8_t time_n;/* Number of cycles for hold time */ +uint8_t prescale;/* Prescale divider */ +uint8_t time_p;/* Timing coefficient */ +uint8_t no_div;/* Disable clock divider */ +uint8_t time_div;/* Post-prescale divider */ +}; + +static const struct bus_speed_cfg std_cfg_table[] = { + [BCM_SPD_100K ] = {0x01 ,0x01 ,0x03 ,0x06 ,0x00 ,0x02 }, + [BCM_SPD_400K ] = {0x05 ,0x01 ,0x03 ,0x05 ,0x01 ,0x02 }, + [BCM_SPD_1MHZ ] = {0x01 ,0x01 ,0x03 ,0x01 ,0x01 ,0x03 }, +}; + +struct bcm_kona_i2c_dev { +void *base; +uint speed; +const struct bus_speed_cfg *std_cfg; +}; + +/* Keep these two defines in sync */ +#define DEF_SPD 100000 +#define DEF_SPD_ENUM BCM_SPD_100K + +#define DEF_DEVICE (num) \ +{(void *)CONFIG_SYS_I2C_BASE##num, DEF_SPD,&std_cfg_table[DEF_SPD_ENUM]} + +static struct bcm_kona_i2c_dev g_i2c_devs[CONFIG_SYS_MAX_I2C_BUS ] = { +#ifdef CONFIG_SYS_I2C_BASE0 +DEF_DEVICE (0 ), +#endif +#ifdef CONFIG_SYS_I2C_BASE1 +DEF_DEVICE (1 ), +#endif +#ifdef CONFIG_SYS_I2C_BASE2 +DEF_DEVICE (2 ), +#endif +#ifdef CONFIG_SYS_I2C_BASE3 +DEF_DEVICE (3 ), +#endif +#ifdef CONFIG_SYS_I2C_BASE4 +DEF_DEVICE (4 ), +#endif +#ifdef CONFIG_SYS_I2C_BASE5 +DEF_DEVICE (5 ), +#endif +}; + +#define I2C_M_TEN 0x0010/* ten bit address */ +#define I2C_M_RD 0x0001/* read data */ +#define I2C_M_NOSTART 0x4000/* no restart between msgs */ + +struct i2c_msg { +uint16_t addr; +uint16_t flags; +uint16_t len; +uint8_t *buf;
drivers/i2c/kona_i2c.c line 173
Quoted 10 lines
drivers/i2c/kona_i2c.c new file +10
-0+}; + +static void bcm_kona_i2c_send_cmd_to_ctrl (struct bcm_kona_i2c_dev *dev, +enum bcm_kona_cmd_t cmd) +{ +debug ("%s, %d\n" , __func__, cmd); + +switch (cmd) { +case BCM_CMD_NOACTION : + writel((CS_CMD_CMD_NO_ACTION<< CS_CMD_SHIFT) |
Nitpicking, should be:
writel((CS_CMD_CMD_NO_ACTION << CS_CMD_SHIFT)
^ ^
Such formatting style seems to go through your complete patch ... maybe you got this source from somewhere, and you do not want to change this. But if so, please add such information in your commit message, see:
http://www.denx.de/wiki/view/U-Boot/Patches#Attributing_Code_Copyrights_Sign
Thanks!
Beside of this, your patch looks good to me.
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH v2 4/6 i2c: kona: Add Kona I2C driver
Quoted 11 lines · Heiko Schocher
Hello Darwin,
Am 03.02.2014 23:12, schrieb Darwin Rambo:
Quoted 6 lines
Add support for the Kona I2C controller found on Broadcom mobile SoCs.
Signed-off-by Darwin Rambo<[email protected]>Reviewed-by Steve Rae<[email protected]>Reviewed-by Tim Kryger<[email protected]>---
What has changed in the v2 of your patch?
PATCH v2 5/6 mmc: kona: Add Kona mmc driver
In reply to Darwin RamboAdd support for the Kona SDHCI found on Broadcom mobile SoCs.
--- drivers/mmc/Makefile | 1 + drivers/mmc/kona_sdhci.c | 125 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 126 insertions(+) create mode 100644 drivers/mmc/kona_sdhci.c
drivers/mmc/Makefile +1 -0
@@ -21,6 +21,7 @@ obj-$(CONFIG_OMAP_HSMMC) += omap_hsmmc.o obj-$(CONFIG_PXA_MMC_GENERIC) += pxa_mmc_gen.o obj-$(CONFIG_SDHCI) += sdhci.o obj-$(CONFIG_BCM2835_SDHCI) += bcm2835_sdhci.o +obj-$(CONFIG_KONA_SDHCI) += kona_sdhci.o obj-$(CONFIG_S5P_SDHCI) += s5p_sdhci.o obj-$(CONFIG_SH_MMCIF) += sh_mmcif.o obj-$(CONFIG_SPEAR_SDHCI) += spear_sdhci.o
drivers/mmc/kona_sdhci.c new file +125 -0
125 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v2 6/6 board: bcm28155_ap: Add board files
In reply to Darwin RamboAdd support for the bcm28155_ap reference board.
--- board/broadcom/bcm28155_ap/Makefile | 7 ++ board/broadcom/bcm28155_ap/bcm28155_ap.c | 87 +++++++++++++++++++ boards.cfg | 1 + include/configs/bcm28155_ap.h | 140 ++++++++++++++++++++++++++++++ 4 files changed, 235 insertions(+) create mode 100644 board/broadcom/bcm28155_ap/Makefile create mode 100644 board/broadcom/bcm28155_ap/bcm28155_ap.c create mode 100644 include/configs/bcm28155_ap.h
board/broadcom/bcm28155_ap/Makefile new file +7 -0
@@ -0,0 +1,7 @@ +# +# Copyright 2013 Broadcom Corporation. All rights reserved. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += $(BOARD).o
board/broadcom/bcm28155_ap/bcm28155_ap.c new file +87 -0
87 lines not on this page · raw message
boards.cfg +1 -0
@@ -272,6 +272,7 @@ Active arm armv7 am33xx ti ti816x Active arm armv7 at91 atmel sama5d3xek sama5d3xek_mmc sama5d3xek:SAMA5D3,SYS_USE_MMC Bo Shen <[email protected]> Active arm armv7 at91 atmel sama5d3xek sama5d3xek_nandflash sama5d3xek:SAMA5D3,SYS_USE_NANDFLASH Bo Shen <[email protected]> Active arm armv7 at91 atmel sama5d3xek sama5d3xek_spiflash sama5d3xek:SAMA5D3,SYS_USE_SERIALFLASH Bo Shen <[email protected]> +Active arm armv7 bcm281xx broadcom bcm28155_ap bcm28155_ap bcm28155_ap Tim Kryger <[email protected]> Active arm armv7 exynos samsung arndale arndale - Inderpal Singh <[email protected]> Active arm armv7 exynos samsung origen origen - Chander Kashyap <[email protected]> Active arm armv7 exynos samsung smdk5250 smdk5250 - Chander Kashyap <[email protected]>
include/configs/bcm28155_ap.h new file +140 -0
140 lines not on this page · raw message
Signature · 1 line
1.7.9.5