#ifndef _mach_avm_h_ #define _mach_avm_h_ #include /*------------------------------------------------------------------------------------------*\ * UR8 UR8 UR8 UR8 UR8 UR8 UR8 UR8 UR8 UR8 UR8 UR8 UR8 UR8 UR8 UR8 UR8 UR8 UR8 UR8 UR8 UR8 \*------------------------------------------------------------------------------------------*/ #ifdef CONFIG_MIPS_UR8 /*------------------------------------------------------------------------------------------*\ \*------------------------------------------------------------------------------------------*/ void ur8_pre_init(void); #define avm_pre_init ur8_pre_init /*------------------------------------------------------------------------------------------*\ \*------------------------------------------------------------------------------------------*/ enum _avm_clock_id { avm_clock_id_non = 0x00, avm_clock_id_cpu = 0x01, avm_clock_id_system = 0x02, avm_clock_id_usb = 0x04, avm_clock_id_dsp = 0x08, avm_clock_id_vbus = 0x10, avm_clock_id_peripheral = 0x20, avm_clock_id_c55x = 0x40, avm_clock_id_ephy = 0x80, avm_clock_id_pci = 0x100, avm_clock_id_tdm = 0x200, avm_clock_id_systempll = 0x400 }; #include #define avm_clk_get_pll_factor ur8_clk_get_pll_factor #define avm_get_clock ur8_get_clock #define avm_set_clock ur8_set_clock #define avm_set_clock_notify ur8_set_clock_notify #define avm_get_clock_notify ur8_get_clock_notify #define avm_set_system_clock_notify ur8_set_system_clock_notify /*------------------------------------------------------------------------------------------*\ \*------------------------------------------------------------------------------------------*/ #define MAX_ENV_ENTRY 256 #define FLASH_ENV_ENTRY_SIZE 64 /*------------------------------------------------------------------------------------------*\ \*------------------------------------------------------------------------------------------*/ char *avm_urlader_env_get_variable(int idx); char *avm_urlader_env_get_value_by_id(unsigned int id); char *avm_urlader_env_get_value(char *var); int avm_urlader_env_set_variable(char *var, char *val); int avm_urlader_env_unset_variable(char *var); int avm_urlader_env_defrag(void); /*------------------------------------------------------------------------------------------*\ \*------------------------------------------------------------------------------------------*/ #include #include #define avm_gpio_init ur8_gpio_init #define avm_gpio_ctrl ur8_gpio_ctrl #define avm_gpio_out_bit ur8_gpio_out_bit #define avm_gpio_in_bit ur8_gpio_in_bit #define avm_gpio_in_value ur8_gpio_in_value #define avm_gpio_set_bitmask ur8_gpio_set_bitmask /*------------------------------------------------------------------------------------------*\ * 240-254 char LOCAL/EXPERIMENTAL USE * 240-254 block LOCAL/EXPERIMENTAL USE * Allocated for local/experimental use. For devices not * assigned official numbers, these ranges should be * used in order to avoid conflicting with future assignments. \*------------------------------------------------------------------------------------------*/ #define AVM_DECT_IO_MAJOR 227 #define AVM_USERMAN_MAJOR 228 #define KDSLD_USERMAN_MAJOR 229 #define AVM_TIATM_MAJOR 230 #define AVM_EVENT_MAJOR 241 #define WATCHDOG_MAJOR 242 #define KDSLD_MAJOR 243 #define KDSLDPTRACE_MAJOR 244 #define UBIK_MAJOR 245 #define DEBUG_TRACE_MAJOR 246 #define AVM_LED_MAJOR 247 #define AVM_I2C_MAJOR 248 #define YAFFS 249 #define AVM_AUDIO_MAJOR 250 #define AVM_NEW_LED_MAJOR 251 #define AVM_POWER_MAJOR 252 #define AVM_NET_TRACE_MAJOR 255 #define AVM_VINAX_MAJOR 253 #define AVM_HSK_MAJOR 254 #define AVM_ATH_EEPROM 239 /*------------------------------------------------------------------------------------------*\ * zusaetzlich folgende: * * 207 char Compaq ProLiant health feature indicate * 220 char Myricom Myrinet "GM" board * 224 char A2232 serial card * 225 char A2232 serial card (alternate devices) * 227 char IBM 3270 terminal Unix tty access * 228 char IBM 3270 terminal block-mode access * 229 char IBM iSeries virtual console * 230 char IBM iSeries virtual tape * \*------------------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------------------*\ \*------------------------------------------------------------------------------------------*/ #include #define avm_power_down_init ur8_power_down_init #define avm_put_device_into_power_down ur8_put_device_into_power_down #define avm_take_device_out_of_power_down ur8_take_device_out_of_power_down #define avm_register_power_down_gpio ur8_register_power_down_gpio #define avm_release_power_down_gpio ur8_release_power_down_gpio #define avm_power_down_status ur8_power_down_status /*------------------------------------------------------------------------------------------*\ \*------------------------------------------------------------------------------------------*/ #include #include #define avm_reset_init ur8_reset_init #define avm_take_device_out_of_reset ur8_take_device_out_of_reset #define avm_put_device_into_reset ur8_put_device_into_reset #define avm_reset_device ur8_reset_device #define avm_reset_status ur8_reset_status #define avm_register_reset_gpio ur8_register_reset_gpio #define avm_release_reset_gpio ur8_release_reset_gpio /*------------------------------------------------------------------------------------------*\ \*------------------------------------------------------------------------------------------*/ #include #define avm_vlynq_init ur8_vlynq_init #define avm_vlynq_init_link ur8_vlynq_init_link #define avm_vlynq_alloc_context ur8_vlynq_alloc_context #define avm_vlynq_free_context ur8_vlynq_free_context /*------------------------------------------------------------------------------------------*\ \*------------------------------------------------------------------------------------------*/ #include #define avm_int_init ur8int_init #define avm_int_set_type ur8int_set_type #define avm_int_ctrl_irq_pacing_setup ur8int_ctrl_irq_pacing_setup #define avm_int_ctrl_irq_pacing_register ur8int_ctrl_irq_pacing_register #define avm_int_ctrl_irq_pacing_unregister ur8int_ctrl_irq_pacing_unregister #define avm_int_ctrl_irq_pacing_set ur8int_ctrl_irq_pacing_set #define avm_nsec_timer ur8_nsec_timer #endif /*--- #ifdef CONFIG_MIPS_UR8 ---*/ #if defined(CONFIG_LANTIQ) /*------------------------------------------------------------------------------------------*\ \*------------------------------------------------------------------------------------------*/ enum _avm_clock_id { avm_clock_id_non = 0x00, avm_clock_id_cpu = 0x01, avm_clock_id_fpi = 0x02, /*--- On-Chip Bus ---*/ avm_clock_id_usb = 0x04, avm_clock_id_pci = 0x08, avm_clock_id_ephy = 0x10, /*--- Ethernet CLKO ---*/ avm_clock_id_ddr = 0x20, /*--- DDR ---*/ avm_clock_id_pp32 = 0x40, /*--- Paketprocessor ---*/ }; extern unsigned int lantiq_get_clock(enum _avm_clock_id clock_id); #define avm_get_clock lantiq_get_clock #include /*--- #define avm_gpio_init arx188_gpio_init ---*/ /*--- #define avm_gpio_ctrl arx188_gpio_ctrl ---*/ /*--- #define avm_gpio_out_bit arx188_gpio_out_bit ---*/ /*--- #define avm_gpio_in_bit arx188_gpio_in_bit ---*/ /*------------------------------------------------------------------------------------------*\ * 240-254 char LOCAL/EXPERIMENTAL USE * 240-254 block LOCAL/EXPERIMENTAL USE * Allocated for local/experimental use. For devices not * assigned official numbers, these ranges should be * used in order to avoid conflicting with future assignments. \*------------------------------------------------------------------------------------------*/ #define AVM_DECT_IO_MAJOR 227 #define AVM_USERMAN_MAJOR 228 #define KDSLD_USERMAN_MAJOR 229 #define AVM_TIATM_MAJOR 230 #define AVM_EVENT_MAJOR 241 #define WATCHDOG_MAJOR 242 #define KDSLD_MAJOR 243 #define KDSLDPTRACE_MAJOR 244 #define UBIK_MAJOR 245 #define DEBUG_TRACE_MAJOR 246 #define AVM_LED_MAJOR 247 #define AVM_I2C_MAJOR 248 #define YAFFS 249 #define AVM_AUDIO_MAJOR 250 #define AVM_NEW_LED_MAJOR 251 #define AVM_POWER_MAJOR 252 #define AVM_NET_TRACE_MAJOR 255 #define AVM_VINAX_MAJOR 253 #define AVM_HSK_MAJOR 254 #define AVM_ATH_EEPROM 239 #endif/*--- #if defined(CONFIG_LANTIQ) ---*/ /*------------------------------------------------------------------------------------------*\ * IKANOS IKANOS IKANOS IKANOS IKANOS IKANOS IKANOS IKANOS IKANOS IKANOS IKANOS IKANOS \*------------------------------------------------------------------------------------------*/ #ifdef CONFIG_MIPS_FUSIV #define default_ikan_lan_xtal 25000000 #define default_ikan_vdsl_xtal 16328000 enum _avm_clock_id { avm_clock_id_non = 0x00, avm_clock_id_cpu = 0x01, /*--- default: 500.000 MHz ---*/ avm_clock_id_system = 0x02, /*--- default: 166.000 MHz ---*/ avm_clock_id_usb = 0x04, /*--- default: 12.000 MHz ---*/ avm_clock_id_usb2 = 0x08, /*--- default: 480.000 MHz ---*/ avm_clock_id_21xx = 0x10, /*--- default: 100.000 MHz ??? ---*/ avm_clock_id_ddr = 0x20, /*--- default: 333.000 MHz ---*/ avm_clock_id_ephy = 0x80, /*--- default: 125.000 MHz ---*/ avm_clock_id_pci = 0x100, /*--- default: 33.000 MHz ---*/ avm_clock_id_pci66 = 0x200, /*--- default: 63.000 MHz ---*/ avm_clock_id_ap = 0x400, /*--- default: 400.000 MHz ??? ---*/ }; #include #define avm_get_clock ikan_get_clock /*------------------------------------------------------------------------------------------*\ \*------------------------------------------------------------------------------------------*/ #define MAX_ENV_ENTRY 256 #define FLASH_ENV_ENTRY_SIZE 64 /*------------------------------------------------------------------------------------------*\ \*------------------------------------------------------------------------------------------*/ char *avm_urlader_env_get_variable(int idx); char *avm_urlader_env_get_value_by_id(unsigned int id); char *avm_urlader_env_get_value(char *var); int avm_urlader_env_set_variable(char *var, char *val); int avm_urlader_env_unset_variable(char *var); int avm_urlader_env_defrag(void); /*------------------------------------------------------------------------------------------*\ \*------------------------------------------------------------------------------------------*/ #include #include #define avm_gpio_init ikan_gpio_init #define avm_gpio_ctrl ikan_gpio_ctrl #define avm_gpio_request_irq ikan_gpio_request_irq #define avm_gpio_enable_irq ikan_gpio_enable_irq #define avm_gpio_disable_irq ikan_gpio_disable_irq #define avm_read_irq_gpio ikan_read_irq_gpio #define avm_gpio_set_delayed_irq_mode ikan_gpio_set_delayed_irq_mode #define avm_gpio_out_bit ikan_gpio_out_bit #define avm_gpio_in_bit ikan_gpio_in_bit #define avm_gpio_in_value ikan_gpio_in_value #define avm_gpio_set_bitmask ikan_gpio_set_bitmask /*------------------------------------------------------------------------------------------*\ * 240-254 char LOCAL/EXPERIMENTAL USE * 240-254 block LOCAL/EXPERIMENTAL USE * Allocated for local/experimental use. For devices not * assigned official numbers, these ranges should be * used in order to avoid conflicting with future assignments. \*------------------------------------------------------------------------------------------*/ #define AVM_DECT_IO_MAJOR 227 #define AVM_USERMAN_MAJOR 228 #define KDSLD_USERMAN_MAJOR 229 #define AVM_TIATM_MAJOR 230 #define AVM_EVENT_MAJOR 241 #define WATCHDOG_MAJOR 242 #define KDSLD_MAJOR 243 #define KDSLDPTRACE_MAJOR 244 #define UBIK_MAJOR 245 #define DEBUG_TRACE_MAJOR 246 #define AVM_LED_MAJOR 247 #define AVM_I2C_MAJOR 248 #define YAFFS 249 #define AVM_AUDIO_MAJOR 250 #define AVM_NEW_LED_MAJOR 251 #define AVM_POWER_MAJOR 252 #define AVM_NET_TRACE_MAJOR 255 #define AVM_VINAX_MAJOR 253 #define AVM_HSK_MAJOR 254 #define AVM_ATH_EEPROM 239 /*------------------------------------------------------------------------------------------*\ * zusaetzlich folgende: * * 207 char Compaq ProLiant health feature indicate * 220 char Myricom Myrinet "GM" board * 224 char A2232 serial card * 225 char A2232 serial card (alternate devices) * 227 char IBM 3270 terminal Unix tty access * 228 char IBM 3270 terminal block-mode access * 229 char IBM iSeries virtual console * 230 char IBM iSeries virtual tape * \*------------------------------------------------------------------------------------------*/ #endif /*--- #ifdef CONFIG_MIPS_FUSIV ---*/ /*------------------------------------------------------------------------------------------*\ * VIRIAN VIRIAN VIRIAN VIRIAN VIRIAN VIRIAN VIRIAN VIRIAN VIRIAN VIRIAN VIRIAN VIRIAN VIRIAN \*------------------------------------------------------------------------------------------*/ #if defined(CONFIG_MACH_AR724x) || defined(CONFIG_MACH_AR934x) || defined(CONFIG_MACH_QCA953x) || defined(CONFIG_MACH_QCA955x) || defined(CONFIG_MACH_QCA956x) /*------------------------------------------------------------------------------------------*\ \*------------------------------------------------------------------------------------------*/ #include #include #define avm_gpio_init ath_avm_gpio_init /*--- init ath_avm_gpio_init(void) ---*/ #define avm_gpio_ctrl ath_avm_gpio_ctrl /*--- int ath_avm_gpio_ctrl(unsigned int gpio_pin, enum _hw_gpio_function pin_mode, enum _hw_gpio_direction pin_dir) ---*/ #define avm_gpio_out_bit ath_avm_gpio_out_bit /*--- int ath_avm_gpio_out_bit(unsigned int gpio_pin, int value) ---*/ #define avm_gpio_in_bit ath_avm_gpio_in_bit /*--- int ath_avm_gpio_in_bit(unsigned int gpio_pin) ---*/ #define avm_gpio_in_value ath_avm_gpio_in_value /*--- unsigned int ath_avm_gpio_in_value(void) ---*/ #define avm_gpio_set_bitmask ath_avm_gpio_set_bitmask /*--- void ath_avm_gpio_set_bitmask(unsigned int mask, unsigned int value) ---*/ #define avm_gpio_request_irq ath_avm_gpio_request_irq #define avm_gpio_enable_irq ath_avm_gpio_enable_irq #define avm_gpio_disable_irq ath_avm_gpio_disable_irq /*------------------------------------------------------------------------------------------*\ \*------------------------------------------------------------------------------------------*/ enum _avm_clock_id { avm_clock_id_non = 0x00, avm_clock_id_cpu = 0x01, avm_clock_id_ddr = 0x02, avm_clock_id_ahb = 0x04, avm_clock_id_ref = 0x08, avm_clock_id_peripheral = 0x10 /*--- Uart ---*/ }; extern unsigned int ath_get_clock(enum _avm_clock_id id); #define avm_get_clock ath_get_clock extern void ath_avm_gpio_dump_registers(const char *prefix); /*------------------------------------------------------------------------------------------*\ \*------------------------------------------------------------------------------------------*/ #define MAX_ENV_ENTRY 256 #define FLASH_ENV_ENTRY_SIZE 64 /*------------------------------------------------------------------------------------------*\ \*------------------------------------------------------------------------------------------*/ char *avm_urlader_env_get_variable(int idx); char *avm_urlader_env_get_value_by_id(unsigned int id); char *avm_urlader_env_get_value(char *var); int avm_urlader_env_set_variable(char *var, char *val); int avm_urlader_env_unset_variable(char *var); int avm_urlader_env_defrag(void); /*------------------------------------------------------------------------------------------*\ * 240-254 char LOCAL/EXPERIMENTAL USE * 240-254 block LOCAL/EXPERIMENTAL USE * Allocated for local/experimental use. For devices not * assigned official numbers, these ranges should be * used in order to avoid conflicting with future assignments. \*------------------------------------------------------------------------------------------*/ #define AVM_DECT_IO_MAJOR 227 #define AVM_USERMAN_MAJOR 228 #define KDSLD_USERMAN_MAJOR 229 #define AVM_TIATM_MAJOR 230 #define AVM_EVENT_MAJOR 241 #define WATCHDOG_MAJOR 242 #define KDSLD_MAJOR 243 #define KDSLDPTRACE_MAJOR 244 #define UBIK_MAJOR 245 #define DEBUG_TRACE_MAJOR 246 #define AVM_LED_MAJOR 247 #define AVM_I2C_MAJOR 248 #define YAFFS 249 #define AVM_AUDIO_MAJOR 250 #define AVM_NEW_LED_MAJOR 251 #define AVM_POWER_MAJOR 252 #define AVM_NET_TRACE_MAJOR 255 #define AVM_VINAX_MAJOR 253 #define AVM_HSK_MAJOR 254 #define AVM_ATH_EEPROM 239 /*------------------------------------------------------------------------------------------*\ * zusaetzlich folgende: * * 207 char Compaq ProLiant health feature indicate * 220 char Myricom Myrinet "GM" board * 224 char A2232 serial card * 225 char A2232 serial card (alternate devices) * 227 char IBM 3270 terminal Unix tty access * 228 char IBM 3270 terminal block-mode access * 229 char IBM iSeries virtual console * 230 char IBM iSeries virtual tape * \*------------------------------------------------------------------------------------------*/ #endif #endif /*--- #ifndef _mach_avm_h_ ---*/