[OpenWrt-Devel] [PATCH 2/4] lantiq: export soc type
Florian Fainelli
florian at openwrt.org
Mon Aug 11 13:35:09 EDT 2014
On 08/11/2014 04:59 AM, Álvaro Fernández Rojas wrote:
> Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
> ---
> diff --git a/target/linux/lantiq/patches-3.10/0209-lantiq-export-soc-type.patch b/target/linux/lantiq/patches-3.10/0209-lantiq-export-soc-type.patch
> new file mode 100644
> index 0000000..cb0a559
> --- /dev/null
> +++ b/target/linux/lantiq/patches-3.10/0209-lantiq-export-soc-type.patch
> @@ -0,0 +1,25 @@
> +--- a/arch/mips/include/asm/mach-lantiq/lantiq.h
> ++++ b/arch/mips/include/asm/mach-lantiq/lantiq.h
> +@@ -48,6 +48,8 @@ extern struct clk *clk_get_ppe(void);
> + extern unsigned char ltq_boot_select(void);
> + /* find out what caused the last cpu reset */
> + extern int ltq_reset_cause(void);
> ++/* find out the soc type */
> ++extern int ltq_soc_type(void);
> +
> + #define IOPORT_RESOURCE_START 0x10000000
> + #define IOPORT_RESOURCE_END 0xffffffff
> +--- a/arch/mips/lantiq/prom.c
> ++++ b/arch/mips/lantiq/prom.c
> +@@ -35,6 +35,11 @@ const char *get_system_type(void)
> + return soc_info.sys_type;
> + }
> +
> ++int ltq_soc_type(void)
> ++{
> ++ return soc_info.type;
> ++}
You might want to have an EXPORT_SYMBOL() for this function such that it
can be used in modules too.
> ++
> + void prom_free_prom_memory(void)
> + {
> + }
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list