MIPS: BCM63XX: enable SPI controller for BCM6362

The SPI controller shares the same register layout as the 6358 one.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/5010/
Acked-by: John Crispin <blogic@openwrt.org>
This commit is contained in:
Jonas Gorski 2013-03-21 14:03:18 +00:00 committed by Ralf Baechle
parent 2c8aaf71b0
commit 08a41d1206
3 changed files with 6 additions and 3 deletions

View file

@ -196,6 +196,8 @@ static void spi_set(struct clk *clk, int enable)
mask = CKCTL_6348_SPI_EN; mask = CKCTL_6348_SPI_EN;
else if (BCMCPU_IS_6358()) else if (BCMCPU_IS_6358())
mask = CKCTL_6358_SPI_EN; mask = CKCTL_6358_SPI_EN;
else if (BCMCPU_IS_6362())
mask = CKCTL_6362_SPI_EN;
else else
/* BCMCPU_IS_6368 */ /* BCMCPU_IS_6368 */
mask = CKCTL_6368_SPI_EN; mask = CKCTL_6368_SPI_EN;

View file

@ -37,7 +37,7 @@ static __init void bcm63xx_spi_regs_init(void)
{ {
if (BCMCPU_IS_6338() || BCMCPU_IS_6348()) if (BCMCPU_IS_6338() || BCMCPU_IS_6348())
bcm63xx_regs_spi = bcm6348_regs_spi; bcm63xx_regs_spi = bcm6348_regs_spi;
if (BCMCPU_IS_6358() || BCMCPU_IS_6368()) if (BCMCPU_IS_6358() || BCMCPU_IS_6362() || BCMCPU_IS_6368())
bcm63xx_regs_spi = bcm6358_regs_spi; bcm63xx_regs_spi = bcm6358_regs_spi;
} }
#else #else
@ -98,7 +98,7 @@ int __init bcm63xx_spi_register(void)
spi_pdata.msg_ctl_width = SPI_6348_MSG_CTL_WIDTH; spi_pdata.msg_ctl_width = SPI_6348_MSG_CTL_WIDTH;
} }
if (BCMCPU_IS_6358() || BCMCPU_IS_6368()) { if (BCMCPU_IS_6358() || BCMCPU_IS_6362() || BCMCPU_IS_6368()) {
spi_resources[0].end += BCM_6358_RSET_SPI_SIZE - 1; spi_resources[0].end += BCM_6358_RSET_SPI_SIZE - 1;
spi_pdata.fifo_size = SPI_6358_MSG_DATA_SIZE; spi_pdata.fifo_size = SPI_6358_MSG_DATA_SIZE;
spi_pdata.msg_type_shift = SPI_6358_MSG_TYPE_SHIFT; spi_pdata.msg_type_shift = SPI_6358_MSG_TYPE_SHIFT;

View file

@ -75,7 +75,8 @@ static inline unsigned long bcm63xx_spireg(enum bcm63xx_regs_spi reg)
#if defined(CONFIG_BCM63XX_CPU_6338) || defined(CONFIG_BCM63XX_CPU_6348) #if defined(CONFIG_BCM63XX_CPU_6338) || defined(CONFIG_BCM63XX_CPU_6348)
__GEN_SPI_RSET(6348) __GEN_SPI_RSET(6348)
#endif #endif
#if defined(CONFIG_BCM63XX_CPU_6358) || defined(CONFIG_BCM63XX_CPU_6368) #if defined(CONFIG_BCM63XX_CPU_6358) || defined(CONFIG_BCM63XX_CPU_6362) || \
defined(CONFIG_BCM63XX_CPU_6368)
__GEN_SPI_RSET(6358) __GEN_SPI_RSET(6358)
#endif #endif
#endif #endif