You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'for-2.6.25' of git://git.secretlab.ca/git/linux-2.6-mpc52xx
This commit is contained in:
@@ -494,10 +494,8 @@ mpc52xx_ata_resume(struct of_device *op)
|
||||
|
||||
|
||||
static struct of_device_id mpc52xx_ata_of_match[] = {
|
||||
{
|
||||
.type = "ata",
|
||||
.compatible = "mpc5200-ata",
|
||||
},
|
||||
{ .compatible = "fsl,mpc5200-ata", },
|
||||
{ .compatible = "mpc5200-ata", },
|
||||
{},
|
||||
};
|
||||
|
||||
|
||||
@@ -1057,10 +1057,8 @@ static int mpc52xx_fec_of_resume(struct of_device *op)
|
||||
#endif
|
||||
|
||||
static struct of_device_id mpc52xx_fec_match[] = {
|
||||
{
|
||||
.type = "network",
|
||||
.compatible = "mpc5200-fec",
|
||||
},
|
||||
{ .type = "network", .compatible = "fsl,mpc5200-fec", },
|
||||
{ .type = "network", .compatible = "mpc5200-fec", },
|
||||
{ }
|
||||
};
|
||||
|
||||
|
||||
@@ -177,11 +177,9 @@ static int mpc52xx_fec_mdio_remove(struct of_device *of)
|
||||
|
||||
|
||||
static struct of_device_id mpc52xx_fec_mdio_match[] = {
|
||||
{
|
||||
.type = "mdio",
|
||||
.compatible = "mpc5200b-fec-phy",
|
||||
},
|
||||
{},
|
||||
{ .compatible = "fsl,mpc5200b-mdio", },
|
||||
{ .compatible = "mpc5200b-fec-phy", },
|
||||
{}
|
||||
};
|
||||
|
||||
struct of_platform_driver mpc52xx_fec_mdio_driver = {
|
||||
|
||||
@@ -130,7 +130,9 @@ static irqreturn_t mpc52xx_uart_int(int irq, void *dev_id);
|
||||
|
||||
#if defined(CONFIG_PPC_MERGE)
|
||||
static struct of_device_id mpc52xx_uart_of_match[] = {
|
||||
{ .type = "serial", .compatible = "mpc5200-psc-uart", },
|
||||
{ .type = "serial", .compatible = "fsl,mpc5200-psc-uart", },
|
||||
{ .type = "serial", .compatible = "mpc5200-psc-uart", }, /* lite5200 */
|
||||
{ .type = "serial", .compatible = "mpc5200-serial", }, /* efika */
|
||||
{},
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -330,80 +330,13 @@ static void mpc52xx_psc_spi_cleanup(struct spi_device *spi)
|
||||
|
||||
static int mpc52xx_psc_spi_port_config(int psc_id, struct mpc52xx_psc_spi *mps)
|
||||
{
|
||||
struct device_node *np;
|
||||
struct mpc52xx_cdm __iomem *cdm;
|
||||
struct mpc52xx_gpio __iomem *gpio;
|
||||
struct mpc52xx_psc __iomem *psc = mps->psc;
|
||||
u32 ul;
|
||||
u32 mclken_div;
|
||||
int ret = 0;
|
||||
|
||||
#if defined(CONFIG_PPC_MERGE)
|
||||
np = of_find_compatible_node(NULL, NULL, "mpc5200-cdm");
|
||||
cdm = of_iomap(np, 0);
|
||||
of_node_put(np);
|
||||
np = of_find_compatible_node(NULL, NULL, "mpc5200-gpio");
|
||||
gpio = of_iomap(np, 0);
|
||||
of_node_put(np);
|
||||
#else
|
||||
cdm = ioremap(MPC52xx_PA(MPC52xx_CDM_OFFSET), MPC52xx_CDM_SIZE);
|
||||
gpio = ioremap(MPC52xx_PA(MPC52xx_GPIO_OFFSET), MPC52xx_GPIO_SIZE);
|
||||
#endif
|
||||
if (!cdm || !gpio) {
|
||||
printk(KERN_ERR "Error mapping CDM/GPIO\n");
|
||||
ret = -EFAULT;
|
||||
goto unmap_regs;
|
||||
}
|
||||
|
||||
/* default sysclk is 512MHz */
|
||||
mclken_div = 0x8000 |
|
||||
(((mps->sysclk ? mps->sysclk : 512000000) / MCLK) & 0x1FF);
|
||||
|
||||
switch (psc_id) {
|
||||
case 1:
|
||||
ul = in_be32(&gpio->port_config);
|
||||
ul &= 0xFFFFFFF8;
|
||||
ul |= 0x00000006;
|
||||
out_be32(&gpio->port_config, ul);
|
||||
out_be16(&cdm->mclken_div_psc1, mclken_div);
|
||||
ul = in_be32(&cdm->clk_enables);
|
||||
ul |= 0x00000020;
|
||||
out_be32(&cdm->clk_enables, ul);
|
||||
break;
|
||||
case 2:
|
||||
ul = in_be32(&gpio->port_config);
|
||||
ul &= 0xFFFFFF8F;
|
||||
ul |= 0x00000060;
|
||||
out_be32(&gpio->port_config, ul);
|
||||
out_be16(&cdm->mclken_div_psc2, mclken_div);
|
||||
ul = in_be32(&cdm->clk_enables);
|
||||
ul |= 0x00000040;
|
||||
out_be32(&cdm->clk_enables, ul);
|
||||
break;
|
||||
case 3:
|
||||
ul = in_be32(&gpio->port_config);
|
||||
ul &= 0xFFFFF0FF;
|
||||
ul |= 0x00000600;
|
||||
out_be32(&gpio->port_config, ul);
|
||||
out_be16(&cdm->mclken_div_psc3, mclken_div);
|
||||
ul = in_be32(&cdm->clk_enables);
|
||||
ul |= 0x00000080;
|
||||
out_be32(&cdm->clk_enables, ul);
|
||||
break;
|
||||
case 6:
|
||||
ul = in_be32(&gpio->port_config);
|
||||
ul &= 0xFF8FFFFF;
|
||||
ul |= 0x00700000;
|
||||
out_be32(&gpio->port_config, ul);
|
||||
out_be16(&cdm->mclken_div_psc6, mclken_div);
|
||||
ul = in_be32(&cdm->clk_enables);
|
||||
ul |= 0x00000010;
|
||||
out_be32(&cdm->clk_enables, ul);
|
||||
break;
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
goto unmap_regs;
|
||||
}
|
||||
mclken_div = (mps->sysclk ? mps->sysclk : 512000000) / MCLK;
|
||||
mpc52xx_set_psc_clkdiv(psc_id, mclken_div);
|
||||
|
||||
/* Reset the PSC into a known state */
|
||||
out_8(&psc->command, MPC52xx_PSC_RST_RX);
|
||||
@@ -427,12 +360,6 @@ static int mpc52xx_psc_spi_port_config(int psc_id, struct mpc52xx_psc_spi *mps)
|
||||
|
||||
mps->bits_per_word = 8;
|
||||
|
||||
unmap_regs:
|
||||
if (cdm)
|
||||
iounmap(cdm);
|
||||
if (gpio)
|
||||
iounmap(gpio);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -628,8 +555,9 @@ static int __exit mpc52xx_psc_spi_of_remove(struct of_device *op)
|
||||
}
|
||||
|
||||
static struct of_device_id mpc52xx_psc_spi_of_match[] = {
|
||||
{ .type = "spi", .compatible = "mpc5200-psc-spi", },
|
||||
{},
|
||||
{ .compatible = "fsl,mpc5200-psc-spi", },
|
||||
{ .compatible = "mpc5200-psc-spi", }, /* old */
|
||||
{}
|
||||
};
|
||||
|
||||
MODULE_DEVICE_TABLE(of, mpc52xx_psc_spi_of_match);
|
||||
|
||||
@@ -136,6 +136,8 @@ ohci_hcd_ppc_of_probe(struct of_device *op, const struct of_device_id *match)
|
||||
ohci = hcd_to_ohci(hcd);
|
||||
if (is_bigendian) {
|
||||
ohci->flags |= OHCI_QUIRK_BE_MMIO | OHCI_QUIRK_BE_DESC;
|
||||
if (of_device_is_compatible(dn, "fsl,mpc5200-ohci"))
|
||||
ohci->flags |= OHCI_QUIRK_FRAME_NO;
|
||||
if (of_device_is_compatible(dn, "mpc5200-ohci"))
|
||||
ohci->flags |= OHCI_QUIRK_FRAME_NO;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user