[PATCH 2/3] mpc82xx: Embedded Planet EP8248E support

Stephen Rothwell sfr at canb.auug.org.au
Mon Jan 14 16:48:50 EST 2008


Hi Scott,

On Fri, 11 Jan 2008 14:07:42 -0600 Scott Wood <scottwood at freescale.com> wrote:
>
> +++ b/arch/powerpc/platforms/82xx/ep8248e.c

> +static struct mdiobb_ops ep8248e_mdio_ops = {

const, please.

> +static struct of_platform_driver ep8248e_mdio_driver = {

	.driver = {

> +	.name = "ep8248e-mdio-bitbang",

	},

> +static const struct cpm_pin ep8248_pins[] = {

Could be __initdata

> +static void __init ep8248_setup_arch(void)
> +{

> +	ep8248e_bcsr_node =
> +		of_find_compatible_node(NULL, NULL, "fsl,ep8248e-bcsr");
> +	if (!ep8248e_bcsr_node) {
> +		printk(KERN_ERR "No bcsr in device tree\n");
> +		return;
> +	}
> +
> +	ep8248e_bcsr = of_iomap(ep8248e_bcsr_node, 0);
> +	if (!ep8248e_bcsr) {
> +		printk(KERN_ERR "Cannot map BCSR registers\n");

		of_node_put(ep8248e_bcsr_node);
		ep8248e_bcsr_node = NULL;

> +		return;

> +static int __init declare_of_platform_devices(void)
> +{
> +	if (!machine_is(ep8248))
> +		return 0;
> +
> +	of_platform_bus_probe(NULL, of_bus_ids, NULL);
> +	of_register_platform_driver(&ep8248e_mdio_driver);
> +
> +	return 0;
> +}
> +device_initcall(declare_of_platform_devices);

machine_device_initcall(ep8248, declare_of_platform_devices);
Then remove the machine_is test above.

-- 
Cheers,
Stephen Rothwell                    sfr at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20080114/10de2f9b/attachment.pgp>


More information about the Linuxppc-dev mailing list