summaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorArtur Artamonov <freeartman@wechall.net>2013-09-27 15:27:32 +0300
committerArtur Artamonov <freeartman@wechall.net>2013-09-27 15:27:32 +0300
commitef827ecd68db25c4f3e99712b1df313bbc296952 (patch)
treedb4333669155786167514e52f7347458535ce1bd /target
parent6b37c34cef1bf8049ece54475151d3a02e79a662 (diff)
Fixed 9xD compilation with new bsp/config.in
Diffstat (limited to 'target')
-rw-r--r--target/linux/realtek/files/arch/rlx/bsp_rtl819xD/bspchip.h16
-rw-r--r--target/linux/realtek/files/arch/rlx/bsp_rtl819xD/rlxhack.h70
-rw-r--r--target/linux/realtek/files/arch/rlx/bsp_rtl819xD/setup.c4
-rw-r--r--target/linux/realtek/patches-2.6.30/fix-double-declaration.patch20
-rw-r--r--target/linux/realtek/rtl8196d/config-2.6.302
5 files changed, 95 insertions, 17 deletions
diff --git a/target/linux/realtek/files/arch/rlx/bsp_rtl819xD/bspchip.h b/target/linux/realtek/files/arch/rlx/bsp_rtl819xD/bspchip.h
index 93d7175c9..9278f9582 100644
--- a/target/linux/realtek/files/arch/rlx/bsp_rtl819xD/bspchip.h
+++ b/target/linux/realtek/files/arch/rlx/bsp_rtl819xD/bspchip.h
@@ -14,21 +14,7 @@
#define _BSPCHIP_H_
#include <linux/autoconf.h>
-
-/*
- * Register access macro
- */
-#define REG32(reg) (*(volatile unsigned int *)((unsigned int)reg))
-#define REG16(reg) (*(volatile unsigned short *)((unsigned int)reg))
-#define REG08(reg) (*(volatile unsigned char *)((unsigned int)reg))
-#define REG8(reg) (*(volatile unsigned char *)((unsigned int)reg))
-
-#define WRITE_MEM32(addr, val) (*(volatile unsigned int *) (addr)) = (val)
-#define READ_MEM32(addr) (*(volatile unsigned int *) (addr))
-#define WRITE_MEM16(addr, val) (*(volatile unsigned short *) (addr)) = (val)
-#define READ_MEM16(addr) (*(volatile unsigned short *) (addr))
-#define WRITE_MEM8(addr, val) (*(volatile unsigned char *) (addr)) = (val)
-#define READ_MEM8(addr) (*(volatile unsigned char *) (addr))
+#include "rlxhack.h"
#define PADDR(addr) ((addr) & 0x1FFFFFFF)
diff --git a/target/linux/realtek/files/arch/rlx/bsp_rtl819xD/rlxhack.h b/target/linux/realtek/files/arch/rlx/bsp_rtl819xD/rlxhack.h
new file mode 100644
index 000000000..450b3bb9c
--- /dev/null
+++ b/target/linux/realtek/files/arch/rlx/bsp_rtl819xD/rlxhack.h
@@ -0,0 +1,70 @@
+#ifndef __RLXHACK_H
+#define __RLXHACK_H
+
+/*
+ * Register access macro
+ */
+#ifndef REG32
+#define REG32(reg) (*(volatile unsigned int *)((unsigned int)reg))
+#define REG16(reg) (*(volatile unsigned short *)((unsigned int)reg))
+#define REG08(reg) (*(volatile unsigned char *)((unsigned int)reg))
+#define REG8(reg) (*(volatile unsigned char *)((unsigned int)reg))
+
+#define WRITE_MEM32(addr, val) (*(volatile unsigned int *) (addr)) = (val)
+#define READ_MEM32(addr) (*(volatile unsigned int *) (addr))
+#define WRITE_MEM16(addr, val) (*(volatile unsigned short *) (addr)) = (val)
+#define READ_MEM16(addr) (*(volatile unsigned short *) (addr))
+#define WRITE_MEM8(addr, val) (*(volatile unsigned char *) (addr)) = (val)
+#define READ_MEM8(addr) (*(volatile unsigned char *) (addr))
+
+#endif
+
+//config options
+#define PRINTF printk
+#define COLORIZE
+#define PRINT_LINENUM
+#define PRINT_FILENAME
+#define PRINT_DEBUG
+
+
+//use color
+#ifdef COLORIZE
+ #define COLOR "1;32m"
+ #define COLOR_S "\033[" COLOR
+ #define COLOR_E "\033[0m"
+#else
+ #define COLOR
+ #define COLOR_S
+ #define COLOR_E
+#endif
+
+//print debug line
+#ifdef PRINT_LINENUM
+ #define PRINT_LINE_F "LINE:%d "
+ #define PRINT_LINE_D __LINE__
+#else
+ #define PRINT_LINE_F ""
+ #define PRINT_LINE_D ""
+#endif
+
+//print
+#ifdef PRINT_FILENAME
+ #define PRINT_FILE_F "FILE:%s "
+ #define PRINT_FILE_D __FILE__
+#else
+ #define PRINT_FILE_F ""
+ #define PRINT_FILE_D ""
+#endif
+
+//print debug string
+#ifdef PRINT_DEBUG
+ #define PRINT_DEBUG_F "Debug: "
+#else
+ #define PRINT_DEBUG_F ""
+#endif
+
+#define PRINT( format, args ... ) PRINTF( COLOR_S PRINT_DEBUG_F \
+ PRINT_FILE_F PRINT_LINE_F format COLOR_E, PRINT_FILE_D, \
+ PRINT_LINE_D, ##args);
+
+#endif
diff --git a/target/linux/realtek/files/arch/rlx/bsp_rtl819xD/setup.c b/target/linux/realtek/files/arch/rlx/bsp_rtl819xD/setup.c
index 932e9aa2b..147b922fb 100644
--- a/target/linux/realtek/files/arch/rlx/bsp_rtl819xD/setup.c
+++ b/target/linux/realtek/files/arch/rlx/bsp_rtl819xD/setup.c
@@ -28,10 +28,12 @@
#include "bspchip.h"
extern int bsp_swcore_init(unsigned int version);
+extern void __init rtl819x_add_device_usb(void);
+
static void prom_putchar(char c)
{
-#define UART0_BASE 0xB8002000
+
#define UART0_THR (UART0_BASE + 0x000)
#define UART0_FCR (UART0_BASE + 0x008)
#define UART0_LSR (UART0_BASE + 0x014)
diff --git a/target/linux/realtek/patches-2.6.30/fix-double-declaration.patch b/target/linux/realtek/patches-2.6.30/fix-double-declaration.patch
new file mode 100644
index 000000000..98ffe3cfc
--- /dev/null
+++ b/target/linux/realtek/patches-2.6.30/fix-double-declaration.patch
@@ -0,0 +1,20 @@
+diff --git a/target/linux/realtek/files/drivers/net/wireless/rtl8192cd/8192cd_security.h b/target/linux/realtek/files/drivers/net/wireless/rtl8192cd/8192cd_security.h
+index a03656b..3212cc1 100644
+--- a/drivers/net/wireless/rtl8192cd/8192cd_security.h
++++ b/drivers/net/wireless/rtl8192cd/8192cd_security.h
+@@ -199,15 +199,6 @@ typedef enum{
+ DOT11_EVENT_WSC_PUTWLREQ_PROBEIND = 88,
+ DOT11_EVENT_WSC_PUTWLREQ_STATUSIND = 89,
+ #endif
+-#ifdef CONFIG_RTL_COMAPI_CFGFILE
+- DOT11_EVENT_WSC_START_IND = 90,
+- //EV_MODE, EV_STATUS, EV_MEHOD, EV_STEP, EV_OOB
+- DOT11_EVENT_WSC_MODE_IND = 91,
+- DOT11_EVENT_WSC_STATUS_IND = 92,
+- DOT11_EVENT_WSC_METHOD_IND = 93,
+- DOT11_EVENT_WSC_STEP_IND = 94,
+- DOT11_EVENT_WSC_OOB_IND = 95,
+-#endif
+
+ #ifdef P2P_SUPPORT
+ DOT11_EVENT_WSC_SWITCH_MODE = 100,
diff --git a/target/linux/realtek/rtl8196d/config-2.6.30 b/target/linux/realtek/rtl8196d/config-2.6.30
index 3d7f3300e..6c8a8860e 100644
--- a/target/linux/realtek/rtl8196d/config-2.6.30
+++ b/target/linux/realtek/rtl8196d/config-2.6.30
@@ -265,7 +265,7 @@ CONFIG_SLAB=y
# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
CONFIG_SLABINFO=y
CONFIG_BASE_SMALL=0
-# CONFIG_MODULES is not set
+CONFIG_MODULES=y
CONFIG_BLOCK=y
# CONFIG_LBD is not set
# CONFIG_BLK_DEV_BSG is not set