-/*
- * LED Registers Mapping
- */
-#define DANUBE_LED (KSEG1 + 0x1E100BB0)
-#define DANUBE_LED_CON0 ((volatile unsigned int*)(DANUBE_LED + 0x0000))
-#define DANUBE_LED_CON1 ((volatile unsigned int*)(DANUBE_LED + 0x0004))
-#define DANUBE_LED_CPU0 ((volatile unsigned int*)(DANUBE_LED + 0x0008))
-#define DANUBE_LED_CPU1 ((volatile unsigned int*)(DANUBE_LED + 0x000C))
-#define DANUBE_LED_AR ((volatile unsigned int*)(DANUBE_LED + 0x0010))
-
-/*
- * LED Control 0 Register
- */
-#define LED_CON0_SWU (*DANUBE_LED_CON0 & (1 << 31))
-#define LED_CON0_FALLING_EDGE (*DANUBE_LED_CON0 & (1 << 26))
-#define LED_CON0_AD1 (*DANUBE_LED_CON0 & (1 << 25))
-#define LED_CON0_AD0 (*DANUBE_LED_CON0 & (1 << 24))
-#define LED_CON0_LBn(n) (*DANUBE_LED_CON0 & (1 << n))
-#define LED_CON0_DEFAULT_VALUE (0x80000000 | (DATA_CLOCKING_EDGE << 26))
-
-/*
- * LED Control 1 Register
- */
-#define LED_CON1_US (*DANUBE_LED_CON1 >> 30)
-#define LED_CON1_SCS (*DANUBE_LED_CON1 & (1 << 28))
-#define LED_CON1_FPID GET_BITS(*DANUBE_LED_CON1, 27, 23)
-#define LED_CON1_FPIS GET_BITS(*DANUBE_LED_CON1, 21, 20)
-#define LED_CON1_DO GET_BITS(*DANUBE_LED_CON1, 19, 18)
-#define LED_CON1_G2 (*DANUBE_LED_CON1 & (1 << 2))
-#define LED_CON1_G1 (*DANUBE_LED_CON1 & (1 << 1))
-#define LED_CON1_G0 (*DANUBE_LED_CON1 & 0x01)
-#define LED_CON1_G (*DANUBE_LED_CON1 & 0x07)
-#define LED_CON1_DEFAULT_VALUE 0x00000000
-
-/*
- * LED Data Output CPU 0 Register
- */
-#define LED_CPU0_Ln(n) (*DANUBE_LED_CPU0 & (1 << n))
-#define LED_LED_CPU0_DEFAULT_VALUE 0x00000000
-
-/*
- * LED Data Output CPU 1 Register
- */
-#define LED_CPU1_Ln(n) (*DANUBE_LED_CPU1 & (1 << n))
-#define LED_LED_CPU1_DEFAULT_VALUE 0x00000000
-
-/*
- * LED Data Output Access Rights Register
- */
-#define LED_AR_Ln(n) (*DANUBE_LED_AR & (1 << n))
-#define LED_AR_DEFAULT_VALUE 0x00000000
-
-/*
- * If try module on Amazon chip, prepare some tricks to prevent invalid memory write.
- */
-#if defined(DEBUG_ON_AMAZON) && DEBUG_ON_AMAZON
- char g_pFakeRegisters[0x50];
-
- #undef DEBUG_WRITE_REGISTER
-
- #undef DANUBE_LED
- #define DANUBE_LED g_pFakeRegisters
-
- #undef port_reserve_pin
- #undef port_free_pin
- #undef port_set_altsel0
- #undef port_clear_altsel0
- #undef port_set_altsel1
- #undef port_clear_altsel1
- #undef port_set_dir_out
-
- #define port_reserve_pin amazon_port_reserve_pin
- #define port_free_pin amazon_port_free_pin
- #define port_set_altsel0 amazon_port_set_altsel0
- #define port_clear_altsel0 amazon_port_clear_altsel0
- #define port_set_altsel1 amazon_port_set_altsel1
- #define port_clear_altsel1 amazon_port_clear_altsel1
- #define port_set_dir_out amazon_port_set_dir_out
-#endif // defined(DEBUG_ON_AMAZON) && DEBUG_ON_AMAZON
-
-
-/*
- * File Operations
- */
-static int led_ioctl(struct inode *, struct file *, unsigned int, unsigned long);
-static int led_open(struct inode *, struct file *);
-static int led_release(struct inode *, struct file *);
-
-/*
- * Software Update LED
- */