Skip to content

Commit

Permalink
Merge tag 'omap-for-v4.6/soc-signed' of git://git.kernel.org/pub/scm/…
Browse files Browse the repository at this point in the history
…linux/kernel/git/tmlind/linux-omap into next/soc

Merge "omap soc changes for v4.6 merge window" from Tony Lindgren:

SoC related changes for omaps for v4.6 merge window:

- Enable runtime revision detection for dra7 to avoid multiple dts
  files for various variants

- Add dma_slave_map for omap1/2/3 legacy mode booting

- Add RTC interconnect target data for ti81xx and am43x

- Add custom reset handler for PCIeSS

- Add eDMA interconnect target data for dra7

* tag 'omap-for-v4.6/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: DRA7: hwmod: Add data for eDMA tpcc, tptc0, tptc1
  ARM: OMAP2+: Add rtc hwmod configuration for ti81xx
  ARM: DRA7: hwmod: Add custom reset handler for PCIeSS
  ARM: OMAP2+: DMA: Provide dma_slave_map to omap-dma for legacy boot
  ARM: OMAP1: DMA: Provide dma_slave_map to omap-dma
  ARM: OMAP: DRA7: Make use of omap_revision information for soc_is* calls
  ARM: AM43XX: hwmod: Add rtc hwmod
  ARM: DRA7: hwmod: Add reset data for PCIe
  ARM: DRA7: hwmod: Fix OCP2SCP sysconfig
  ARM: OMAP2+: hwmod data: Add SSI data for omap36xx
  • Loading branch information
Arnd Bergmann committed Mar 2, 2016
2 parents f3a186f + e804991 commit 3fcb230
Show file tree
Hide file tree
Showing 8 changed files with 368 additions and 12 deletions.
45 changes: 45 additions & 0 deletions arch/arm/mach-omap1/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <linux/device.h>
#include <linux/io.h>
#include <linux/dma-mapping.h>
#include <linux/dmaengine.h>
#include <linux/omap-dma.h>
#include <mach/tc.h>

Expand Down Expand Up @@ -265,6 +266,42 @@ static const struct platform_device_info omap_dma_dev_info = {
.num_res = 1,
};

/* OMAP730, OMAP850 */
static const struct dma_slave_map omap7xx_sdma_map[] = {
{ "omap-mcbsp.1", "tx", SDMA_FILTER_PARAM(8) },
{ "omap-mcbsp.1", "rx", SDMA_FILTER_PARAM(9) },
{ "omap-mcbsp.2", "tx", SDMA_FILTER_PARAM(10) },
{ "omap-mcbsp.2", "rx", SDMA_FILTER_PARAM(11) },
{ "mmci-omap.0", "tx", SDMA_FILTER_PARAM(21) },
{ "mmci-omap.0", "rx", SDMA_FILTER_PARAM(22) },
{ "omap_udc", "rx0", SDMA_FILTER_PARAM(26) },
{ "omap_udc", "rx1", SDMA_FILTER_PARAM(27) },
{ "omap_udc", "rx2", SDMA_FILTER_PARAM(28) },
{ "omap_udc", "tx0", SDMA_FILTER_PARAM(29) },
{ "omap_udc", "tx1", SDMA_FILTER_PARAM(30) },
{ "omap_udc", "tx2", SDMA_FILTER_PARAM(31) },
};

/* OMAP1510, OMAP1610*/
static const struct dma_slave_map omap1xxx_sdma_map[] = {
{ "omap-mcbsp.1", "tx", SDMA_FILTER_PARAM(8) },
{ "omap-mcbsp.1", "rx", SDMA_FILTER_PARAM(9) },
{ "omap-mcbsp.3", "tx", SDMA_FILTER_PARAM(10) },
{ "omap-mcbsp.3", "rx", SDMA_FILTER_PARAM(11) },
{ "omap-mcbsp.2", "tx", SDMA_FILTER_PARAM(16) },
{ "omap-mcbsp.2", "rx", SDMA_FILTER_PARAM(17) },
{ "mmci-omap.0", "tx", SDMA_FILTER_PARAM(21) },
{ "mmci-omap.0", "rx", SDMA_FILTER_PARAM(22) },
{ "omap_udc", "rx0", SDMA_FILTER_PARAM(26) },
{ "omap_udc", "rx1", SDMA_FILTER_PARAM(27) },
{ "omap_udc", "rx2", SDMA_FILTER_PARAM(28) },
{ "omap_udc", "tx0", SDMA_FILTER_PARAM(29) },
{ "omap_udc", "tx1", SDMA_FILTER_PARAM(30) },
{ "omap_udc", "tx2", SDMA_FILTER_PARAM(31) },
{ "mmci-omap.1", "tx", SDMA_FILTER_PARAM(54) },
{ "mmci-omap.1", "rx", SDMA_FILTER_PARAM(55) },
};

static struct omap_system_dma_plat_info dma_plat_info __initdata = {
.reg_map = reg_map,
.channel_stride = 0x40,
Expand Down Expand Up @@ -342,6 +379,14 @@ static int __init omap1_system_dma_init(void)
p.dma_attr = d;
p.errata = configure_dma_errata();

if (cpu_is_omap7xx()) {
p.slave_map = omap7xx_sdma_map;
p.slavecnt = ARRAY_SIZE(omap7xx_sdma_map);
} else {
p.slave_map = omap1xxx_sdma_map;
p.slavecnt = ARRAY_SIZE(omap1xxx_sdma_map);
}

ret = platform_device_add_data(pdev, &p, sizeof(p));
if (ret) {
dev_err(&pdev->dev, "%s: Unable to add resources for %s%d\n",
Expand Down
117 changes: 117 additions & 0 deletions arch/arm/mach-omap2/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <linux/init.h>
#include <linux/device.h>
#include <linux/dma-mapping.h>
#include <linux/dmaengine.h>
#include <linux/of.h>
#include <linux/omap-dma.h>

Expand Down Expand Up @@ -203,6 +204,108 @@ static unsigned configure_dma_errata(void)
return errata;
}

static const struct dma_slave_map omap24xx_sdma_map[] = {
{ "omap-gpmc", "rxtx", SDMA_FILTER_PARAM(4) },
{ "omap-aes", "tx", SDMA_FILTER_PARAM(9) },
{ "omap-aes", "rx", SDMA_FILTER_PARAM(10) },
{ "omap-sham", "rx", SDMA_FILTER_PARAM(13) },
{ "omap2_mcspi.2", "tx0", SDMA_FILTER_PARAM(15) },
{ "omap2_mcspi.2", "rx0", SDMA_FILTER_PARAM(16) },
{ "omap-mcbsp.3", "tx", SDMA_FILTER_PARAM(17) },
{ "omap-mcbsp.3", "rx", SDMA_FILTER_PARAM(18) },
{ "omap-mcbsp.4", "tx", SDMA_FILTER_PARAM(19) },
{ "omap-mcbsp.4", "rx", SDMA_FILTER_PARAM(20) },
{ "omap-mcbsp.5", "tx", SDMA_FILTER_PARAM(21) },
{ "omap-mcbsp.5", "rx", SDMA_FILTER_PARAM(22) },
{ "omap2_mcspi.2", "tx1", SDMA_FILTER_PARAM(23) },
{ "omap2_mcspi.2", "rx1", SDMA_FILTER_PARAM(24) },
{ "omap_i2c.1", "tx", SDMA_FILTER_PARAM(27) },
{ "omap_i2c.1", "rx", SDMA_FILTER_PARAM(28) },
{ "omap_i2c.2", "tx", SDMA_FILTER_PARAM(29) },
{ "omap_i2c.2", "rx", SDMA_FILTER_PARAM(30) },
{ "omap-mcbsp.1", "tx", SDMA_FILTER_PARAM(31) },
{ "omap-mcbsp.1", "rx", SDMA_FILTER_PARAM(32) },
{ "omap-mcbsp.2", "tx", SDMA_FILTER_PARAM(33) },
{ "omap-mcbsp.2", "rx", SDMA_FILTER_PARAM(34) },
{ "omap2_mcspi.0", "tx0", SDMA_FILTER_PARAM(35) },
{ "omap2_mcspi.0", "rx0", SDMA_FILTER_PARAM(36) },
{ "omap2_mcspi.0", "tx1", SDMA_FILTER_PARAM(37) },
{ "omap2_mcspi.0", "rx1", SDMA_FILTER_PARAM(38) },
{ "omap2_mcspi.0", "tx2", SDMA_FILTER_PARAM(39) },
{ "omap2_mcspi.0", "rx2", SDMA_FILTER_PARAM(40) },
{ "omap2_mcspi.0", "tx3", SDMA_FILTER_PARAM(41) },
{ "omap2_mcspi.0", "rx3", SDMA_FILTER_PARAM(42) },
{ "omap2_mcspi.1", "tx0", SDMA_FILTER_PARAM(43) },
{ "omap2_mcspi.1", "rx0", SDMA_FILTER_PARAM(44) },
{ "omap2_mcspi.1", "tx1", SDMA_FILTER_PARAM(45) },
{ "omap2_mcspi.1", "rx1", SDMA_FILTER_PARAM(46) },
{ "omap_hsmmc.1", "tx", SDMA_FILTER_PARAM(47) },
{ "omap_hsmmc.1", "rx", SDMA_FILTER_PARAM(48) },
{ "omap_uart.0", "tx", SDMA_FILTER_PARAM(49) },
{ "omap_uart.0", "rx", SDMA_FILTER_PARAM(50) },
{ "omap_uart.1", "tx", SDMA_FILTER_PARAM(51) },
{ "omap_uart.1", "rx", SDMA_FILTER_PARAM(52) },
{ "omap_uart.2", "tx", SDMA_FILTER_PARAM(53) },
{ "omap_uart.2", "rx", SDMA_FILTER_PARAM(54) },
{ "omap_hsmmc.0", "tx", SDMA_FILTER_PARAM(61) },
{ "omap_hsmmc.0", "rx", SDMA_FILTER_PARAM(62) },
};

static const struct dma_slave_map omap3xxx_sdma_map[] = {
{ "omap-gpmc", "rxtx", SDMA_FILTER_PARAM(4) },
{ "omap2_mcspi.2", "tx0", SDMA_FILTER_PARAM(15) },
{ "omap2_mcspi.2", "rx0", SDMA_FILTER_PARAM(16) },
{ "omap-mcbsp.3", "tx", SDMA_FILTER_PARAM(17) },
{ "omap-mcbsp.3", "rx", SDMA_FILTER_PARAM(18) },
{ "omap-mcbsp.4", "tx", SDMA_FILTER_PARAM(19) },
{ "omap-mcbsp.4", "rx", SDMA_FILTER_PARAM(20) },
{ "omap-mcbsp.5", "tx", SDMA_FILTER_PARAM(21) },
{ "omap-mcbsp.5", "rx", SDMA_FILTER_PARAM(22) },
{ "omap2_mcspi.2", "tx1", SDMA_FILTER_PARAM(23) },
{ "omap2_mcspi.2", "rx1", SDMA_FILTER_PARAM(24) },
{ "omap_i2c.3", "tx", SDMA_FILTER_PARAM(25) },
{ "omap_i2c.3", "rx", SDMA_FILTER_PARAM(26) },
{ "omap_i2c.1", "tx", SDMA_FILTER_PARAM(27) },
{ "omap_i2c.1", "rx", SDMA_FILTER_PARAM(28) },
{ "omap_i2c.2", "tx", SDMA_FILTER_PARAM(29) },
{ "omap_i2c.2", "rx", SDMA_FILTER_PARAM(30) },
{ "omap-mcbsp.1", "tx", SDMA_FILTER_PARAM(31) },
{ "omap-mcbsp.1", "rx", SDMA_FILTER_PARAM(32) },
{ "omap-mcbsp.2", "tx", SDMA_FILTER_PARAM(33) },
{ "omap-mcbsp.2", "rx", SDMA_FILTER_PARAM(34) },
{ "omap2_mcspi.0", "tx0", SDMA_FILTER_PARAM(35) },
{ "omap2_mcspi.0", "rx0", SDMA_FILTER_PARAM(36) },
{ "omap2_mcspi.0", "tx1", SDMA_FILTER_PARAM(37) },
{ "omap2_mcspi.0", "rx1", SDMA_FILTER_PARAM(38) },
{ "omap2_mcspi.0", "tx2", SDMA_FILTER_PARAM(39) },
{ "omap2_mcspi.0", "rx2", SDMA_FILTER_PARAM(40) },
{ "omap2_mcspi.0", "tx3", SDMA_FILTER_PARAM(41) },
{ "omap2_mcspi.0", "rx3", SDMA_FILTER_PARAM(42) },
{ "omap2_mcspi.1", "tx0", SDMA_FILTER_PARAM(43) },
{ "omap2_mcspi.1", "rx0", SDMA_FILTER_PARAM(44) },
{ "omap2_mcspi.1", "tx1", SDMA_FILTER_PARAM(45) },
{ "omap2_mcspi.1", "rx1", SDMA_FILTER_PARAM(46) },
{ "omap_hsmmc.1", "tx", SDMA_FILTER_PARAM(47) },
{ "omap_hsmmc.1", "rx", SDMA_FILTER_PARAM(48) },
{ "omap_uart.0", "tx", SDMA_FILTER_PARAM(49) },
{ "omap_uart.0", "rx", SDMA_FILTER_PARAM(50) },
{ "omap_uart.1", "tx", SDMA_FILTER_PARAM(51) },
{ "omap_uart.1", "rx", SDMA_FILTER_PARAM(52) },
{ "omap_uart.2", "tx", SDMA_FILTER_PARAM(53) },
{ "omap_uart.2", "rx", SDMA_FILTER_PARAM(54) },
{ "omap_hsmmc.0", "tx", SDMA_FILTER_PARAM(61) },
{ "omap_hsmmc.0", "rx", SDMA_FILTER_PARAM(62) },
{ "omap-aes", "tx", SDMA_FILTER_PARAM(65) },
{ "omap-aes", "rx", SDMA_FILTER_PARAM(66) },
{ "omap-sham", "rx", SDMA_FILTER_PARAM(69) },
{ "omap2_mcspi.3", "tx0", SDMA_FILTER_PARAM(70) },
{ "omap2_mcspi.3", "rx0", SDMA_FILTER_PARAM(71) },
{ "omap_hsmmc.2", "tx", SDMA_FILTER_PARAM(77) },
{ "omap_hsmmc.2", "rx", SDMA_FILTER_PARAM(78) },
{ "omap_uart.3", "tx", SDMA_FILTER_PARAM(81) },
{ "omap_uart.3", "rx", SDMA_FILTER_PARAM(82) },
};

static struct omap_system_dma_plat_info dma_plat_info __initdata = {
.reg_map = reg_map,
.channel_stride = 0x60,
Expand Down Expand Up @@ -231,6 +334,20 @@ static int __init omap2_system_dma_init_dev(struct omap_hwmod *oh, void *unused)
p.dma_attr = (struct omap_dma_dev_attr *)oh->dev_attr;
p.errata = configure_dma_errata();

if (!of_have_populated_dt()) {
if (soc_is_omap24xx()) {
p.slave_map = omap24xx_sdma_map;
p.slavecnt = ARRAY_SIZE(omap24xx_sdma_map);
} else if (soc_is_omap34xx() || soc_is_omap3630()) {
p.slave_map = omap3xxx_sdma_map;
p.slavecnt = ARRAY_SIZE(omap3xxx_sdma_map);
} else {
pr_err("%s: The legacy DMA map is not provided!\n",
__func__);
return -ENODEV;
}
}

pdev = omap_device_build(name, 0, oh, &p, sizeof(p));
if (IS_ERR(pdev)) {
pr_err("%s: Can't build omap_device for %s:%s.\n",
Expand Down
13 changes: 7 additions & 6 deletions arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -3583,14 +3583,14 @@ static struct omap_hwmod_class_sysconfig omap34xx_ssi_sysc = {
.sysc_fields = &omap_hwmod_sysc_type1,
};

static struct omap_hwmod_class omap34xx_ssi_hwmod_class = {
static struct omap_hwmod_class omap3xxx_ssi_hwmod_class = {
.name = "ssi",
.sysc = &omap34xx_ssi_sysc,
};

static struct omap_hwmod omap34xx_ssi_hwmod = {
static struct omap_hwmod omap3xxx_ssi_hwmod = {
.name = "ssi",
.class = &omap34xx_ssi_hwmod_class,
.class = &omap3xxx_ssi_hwmod_class,
.clkdm_name = "core_l4_clkdm",
.main_clk = "ssi_ssr_fck",
.prcm = {
Expand All @@ -3605,9 +3605,9 @@ static struct omap_hwmod omap34xx_ssi_hwmod = {
};

/* L4 CORE -> SSI */
static struct omap_hwmod_ocp_if omap34xx_l4_core__ssi = {
static struct omap_hwmod_ocp_if omap3xxx_l4_core__ssi = {
.master = &omap3xxx_l4_core_hwmod,
.slave = &omap34xx_ssi_hwmod,
.slave = &omap3xxx_ssi_hwmod,
.clk = "ssi_ick",
.user = OCP_USER_MPU | OCP_USER_SDMA,
};
Expand Down Expand Up @@ -3760,7 +3760,7 @@ static struct omap_hwmod_ocp_if *omap34xx_hwmod_ocp_ifs[] __initdata = {
&omap3xxx_sad2d__l3,
&omap3xxx_l4_core__mmu_isp,
&omap3xxx_l3_main__mmu_iva,
&omap34xx_l4_core__ssi,
&omap3xxx_l4_core__ssi,
NULL
};

Expand All @@ -3784,6 +3784,7 @@ static struct omap_hwmod_ocp_if *omap36xx_hwmod_ocp_ifs[] __initdata = {
&omap3xxx_sad2d__l3,
&omap3xxx_l4_core__mmu_isp,
&omap3xxx_l3_main__mmu_iva,
&omap3xxx_l4_core__ssi,
NULL
};

Expand Down
14 changes: 13 additions & 1 deletion arch/arm/mach-omap2/omap_hwmod_43xx_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -1020,9 +1020,21 @@ static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = {
NULL,
};

static struct omap_hwmod_ocp_if *am43xx_rtc_hwmod_ocp_ifs[] __initdata = {
&am33xx_l4_wkup__rtc,
NULL,
};

int __init am43xx_hwmod_init(void)
{
int ret;

omap_hwmod_am43xx_reg();
omap_hwmod_init();
return omap_hwmod_register_links(am43xx_hwmod_ocp_ifs);
ret = omap_hwmod_register_links(am43xx_hwmod_ocp_ifs);

if (!ret && of_machine_is_compatible("ti,am4372"))
ret = omap_hwmod_register_links(am43xx_rtc_hwmod_ocp_ifs);

return ret;
}
Loading

0 comments on commit 3fcb230

Please sign in to comment.