From: John Jacques <john.jacq...@lsi.com> needed to get them included in the simulation build.
Signed-off-by: John Jacques <john.jacq...@lsi.com> --- arch/arm/mach-axxia/Makefile | 1 + arch/arm/mach-axxia/wrappers.c | 132 ++++++++++++++++++++++++++++++++ arch/powerpc/sysdev/Makefile | 2 +- arch/powerpc/sysdev/lsi_acp_wrappers.c | 132 ++++++++++++++++++++++++++++++++ drivers/net/ethernet/lsi/lsi_acp_mdio.c | 96 +---------------------- drivers/net/ethernet/lsi/lsi_acp_net.c | 2 +- 6 files changed, 269 insertions(+), 96 deletions(-) create mode 100644 arch/arm/mach-axxia/wrappers.c create mode 100644 arch/powerpc/sysdev/lsi_acp_wrappers.c diff --git a/arch/arm/mach-axxia/Makefile b/arch/arm/mach-axxia/Makefile index 6282d36..ac05192 100644 --- a/arch/arm/mach-axxia/Makefile +++ b/arch/arm/mach-axxia/Makefile @@ -1,6 +1,7 @@ # # Makefile for the linux kernel. # +obj-y += wrappers.o obj-y += axxia.o obj-y += clock.o obj-y += io.o diff --git a/arch/arm/mach-axxia/wrappers.c b/arch/arm/mach-axxia/wrappers.c new file mode 100644 index 0000000..fe384aa --- /dev/null +++ b/arch/arm/mach-axxia/wrappers.c @@ -0,0 +1,132 @@ +/* + * arch/arm/mach-axxia/wrappers.c + * + * Copyright (C) 2013 LSI + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <linux/module.h> +#include <asm/irq.h> +#include <linux/io.h> +#include <linux/irqdomain.h> +#include <linux/skbuff.h> +#include <linux/platform_device.h> + +/* + ============================================================================== + ============================================================================== + Platform Device Registration + ============================================================================== + ============================================================================== +*/ + +/* + ------------------------------------------------------------------------------ + acp_platform_device_register +*/ + +int +acp_platform_device_register(struct platform_device *pdev) +{ + return platform_device_register(pdev); +} +EXPORT_SYMBOL(acp_platform_device_register); + +/* + ------------------------------------------------------------------------------ + acp_platform_device_unregister +*/ + +void +acp_platform_device_unregister(struct platform_device *pdev) +{ + platform_device_unregister(pdev); + + return; +} +EXPORT_SYMBOL(acp_platform_device_unregister); + +/* + ============================================================================ + ============================================================================ + SKB + ============================================================================ + ============================================================================ +*/ + +/* + ---------------------------------------------------------------------------- + acp_skb_tstamp_tx +*/ + +void +acp_skb_tstamp_tx(struct sk_buff *orig_skb, + struct skb_shared_hwtstamps *hwtstamps) { + skb_tstamp_tx(orig_skb, hwtstamps); +} +EXPORT_SYMBOL(acp_skb_tstamp_tx); + +/* + ============================================================================ + ============================================================================ + Interrupts + ============================================================================ + ============================================================================ +*/ + +/* + * ------------------------------------------------------------------------- + * acp_irq_create_mapping + */ +unsigned int acp_irq_create_mapping(struct irq_domain *host, + irq_hw_number_t hwirq) +{ + unsigned int mapped_irq; + + preempt_disable(); + mapped_irq = irq_create_mapping(host, hwirq); + preempt_enable(); + + return mapped_irq; +} +EXPORT_SYMBOL(acp_irq_create_mapping); + +/* + ============================================================================== + ============================================================================== + Linux Stuff + ============================================================================== + ============================================================================== +*/ + +/* + ------------------------------------------------------------------------------ + acp_wrappers_init +*/ + +int __init +acp_wrappers_init(void) +{ + printk(KERN_INFO "Initializing Axxia Wrappers.\n"); + + return 0; +} + +module_init(acp_wrappers_init); + +MODULE_AUTHOR("LSI Corporation"); +MODULE_DESCRIPTION("Timing Test"); +MODULE_LICENSE("GPL"); diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile index 6354d1c..a95b59f 100644 --- a/arch/powerpc/sysdev/Makefile +++ b/arch/powerpc/sysdev/Makefile @@ -73,4 +73,4 @@ obj-$(CONFIG_PPC_XICS) += xics/ obj-$(CONFIG_GE_FPGA) += ge/ -obj-$(CONFIG_ACP) += lsi_acp_ncr.o +obj-$(CONFIG_ACP) += lsi_acp_ncr.o lsi_acp_wrappers.o diff --git a/arch/powerpc/sysdev/lsi_acp_wrappers.c b/arch/powerpc/sysdev/lsi_acp_wrappers.c new file mode 100644 index 0000000..724c96c --- /dev/null +++ b/arch/powerpc/sysdev/lsi_acp_wrappers.c @@ -0,0 +1,132 @@ +/* + * arch/powerpc/sysdev/lsi_acp_wrappers.c + * + * Copyright (C) 2013 LSI + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <linux/module.h> +#include <asm/irq.h> +#include <linux/io.h> +#include <linux/irqdomain.h> +#include <linux/skbuff.h> +#include <linux/platform_device.h> + +/* + ============================================================================== + ============================================================================== + Platform Device Registration + ============================================================================== + ============================================================================== +*/ + +/* + ------------------------------------------------------------------------------ + acp_platform_device_register +*/ + +int +acp_platform_device_register(struct platform_device *pdev) +{ + return platform_device_register(pdev); +} +EXPORT_SYMBOL(acp_platform_device_register); + +/* + ------------------------------------------------------------------------------ + acp_platform_device_unregister +*/ + +void +acp_platform_device_unregister(struct platform_device *pdev) +{ + platform_device_unregister(pdev); + + return; +} +EXPORT_SYMBOL(acp_platform_device_unregister); + +/* + ============================================================================ + ============================================================================ + SKB + ============================================================================ + ============================================================================ +*/ + +/* + ---------------------------------------------------------------------------- + acp_skb_tstamp_tx +*/ + +void +acp_skb_tstamp_tx(struct sk_buff *orig_skb, + struct skb_shared_hwtstamps *hwtstamps) { + skb_tstamp_tx(orig_skb, hwtstamps); +} +EXPORT_SYMBOL(acp_skb_tstamp_tx); + +/* + ============================================================================ + ============================================================================ + Interrupts + ============================================================================ + ============================================================================ +*/ + +/* + * ------------------------------------------------------------------------- + * acp_irq_create_mapping + */ +unsigned int acp_irq_create_mapping(struct irq_domain *host, + irq_hw_number_t hwirq) +{ + unsigned int mapped_irq; + + preempt_disable(); + mapped_irq = irq_create_mapping(host, hwirq); + preempt_enable(); + + return mapped_irq; +} +EXPORT_SYMBOL(acp_irq_create_mapping); + +/* + ============================================================================== + ============================================================================== + Linux Stuff + ============================================================================== + ============================================================================== +*/ + +/* + ------------------------------------------------------------------------------ + acp_wrappers_init +*/ + +int __init +acp_wrappers_init(void) +{ + printk(KERN_INFO "Initializing Axxia Wrappers.\n"); + + return 0; +} + +module_init(acp_wrappers_init); + +MODULE_AUTHOR("LSI Corporation"); +MODULE_DESCRIPTION("Timing Test"); +MODULE_LICENSE("GPL"); diff --git a/drivers/net/ethernet/lsi/lsi_acp_mdio.c b/drivers/net/ethernet/lsi/lsi_acp_mdio.c index 8602374..739f34c 100644 --- a/drivers/net/ethernet/lsi/lsi_acp_mdio.c +++ b/drivers/net/ethernet/lsi/lsi_acp_mdio.c @@ -140,11 +140,6 @@ acp_mdio_read(unsigned long address, unsigned long offset, *value = (unsigned short)(command & 0xffff); spin_unlock_irqrestore(&mdio_lock, flags); -#if 0 - printk("%s - Read 0x%x from 0x%x register 0x%x\n", - __FUNCTION__, *value, address, offset); -#endif - return 0; } EXPORT_SYMBOL(acp_mdio_read); @@ -240,11 +235,6 @@ acp_mdio_write(unsigned long address, unsigned long offset, spin_unlock_irqrestore(&mdio_lock, flags); -#if 0 - printk("%s - Wrote 0x%x to 0x%x register 0x%x\n", - __FUNCTION__, value, address, offset); -#endif - return 0; } EXPORT_SYMBOL(acp_mdio_write); @@ -273,88 +263,6 @@ acp_mdio_initialize(void) /* ============================================================================== ============================================================================== - Platform Device Registration - ============================================================================== - ============================================================================== -*/ - -/* - ------------------------------------------------------------------------------ - acp_platform_device_register -*/ - -int -acp_platform_device_register(struct platform_device *pdev) -{ - return platform_device_register(pdev); -} - -EXPORT_SYMBOL(acp_platform_device_register); - -/* - ------------------------------------------------------------------------------ - acp_platform_device_unregister -*/ - -void -acp_platform_device_unregister(struct platform_device *pdev) -{ - platform_device_unregister(pdev); - - return; -} - -EXPORT_SYMBOL(acp_platform_device_unregister); - -/* - ============================================================================ - ============================================================================ - SKB - ============================================================================ - ============================================================================ -*/ - -/* - ---------------------------------------------------------------------------- - acp_skb_tstamp_tx -*/ - -void -acp_skb_tstamp_tx(struct sk_buff *orig_skb, - struct skb_shared_hwtstamps *hwtstamps) { - skb_tstamp_tx(orig_skb, hwtstamps); -} - -EXPORT_SYMBOL(acp_skb_tstamp_tx); - -/* - ============================================================================ - ============================================================================ - Interrupts - ============================================================================ - ============================================================================ -*/ - -/* - * ------------------------------------------------------------------------- - * acp_irq_create_mapping - */ -unsigned int acp_irq_create_mapping(struct irq_domain *host, - irq_hw_number_t hwirq) -{ - unsigned int mapped_irq; - - preempt_disable(); - mapped_irq = irq_create_mapping(host, hwirq); - preempt_enable(); - - return mapped_irq; -} -EXPORT_SYMBOL(acp_irq_create_mapping); - -/* - ============================================================================== - ============================================================================== Linux Stuff ============================================================================== ============================================================================== @@ -366,7 +274,7 @@ EXPORT_SYMBOL(acp_irq_create_mapping); */ int __init -acp_wrappers_init(void) +acp_mdio_init(void) { int rc = -ENODEV; struct device_node *np = NULL; @@ -403,7 +311,7 @@ error: return rc; } -module_init(acp_wrappers_init); +module_init(acp_mdio_init); MODULE_AUTHOR("LSI Corporation"); MODULE_DESCRIPTION("Timing Test"); diff --git a/drivers/net/ethernet/lsi/lsi_acp_net.c b/drivers/net/ethernet/lsi/lsi_acp_net.c index 0fe090e..21f4cb9 100644 --- a/drivers/net/ethernet/lsi/lsi_acp_net.c +++ b/drivers/net/ethernet/lsi/lsi_acp_net.c @@ -92,7 +92,7 @@ /* Define to disable full duplex mode on Amarillo boards */ #undef AMARILLO_WA -/*#define AMARILLO_WA*/ +#define AMARILLO_WA #define LSI_DRV_NAME "acp-femac" #define LSI_MDIO_NAME "acp-femac-mdio" -- 1.8.4.3 _______________________________________________ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto