[OpenWrt-Devel] [PATCH 1/5] [orion] move dt2 modifications to single patch
From: Eugene San (eugenesan) eugene...@gmail.com Signed-off-by: Eugene San (eugenesan) eugene...@gmail.com --- .../orion/files/arch/arm/mach-orion5x/dt2-common.h | 82 --- .../orion/files/arch/arm/mach-orion5x/dt2-setup.c | 446 .../orion/patches/200-dt2_board_support.patch | 542 +++- 3 files changed, 527 insertions(+), 543 deletions(-) delete mode 100644 target/linux/orion/files/arch/arm/mach-orion5x/dt2-common.h delete mode 100644 target/linux/orion/files/arch/arm/mach-orion5x/dt2-setup.c diff --git a/target/linux/orion/files/arch/arm/mach-orion5x/dt2-common.h b/target/linux/orion/files/arch/arm/mach-orion5x/dt2-common.h deleted file mode 100644 index a54e188..000 --- a/target/linux/orion/files/arch/arm/mach-orion5x/dt2-common.h +++ /dev/null @@ -1,82 +0,0 @@ -#ifndef __INC_DT2_COMMON_H -#define __INC_DT2_COMMON_H - -#define ATAG_MV_UBOOT 0x41000403 - -struct tag_mv_uboot { - u32 uboot_version; - u32 tclk; - u32 sysclk; - u32 isUsbHost; - u32 overEthAddr; - u8 dt2_eeprom[256]; -}; - -#define DT2_EEPROM_ADDR0x50 -#define DT2_EEPROM_OFFSET 0 -#define DT2_EEPROM_LENGTH 256 - -#define DT2_SERIAL_NUMBER_DEFAULT run on default\0 -#define DT2_REVISION_DEFAULT_INIT 0xFF -#define DT2_CONFIG_FLAGS_DEFAULT 0x00 - -#define _PACKED_ __attribute__((packed)) - -struct DT2_EEPROM_SD_CONFIG { - unsigned intram_1; - unsigned intram_2; - unsigned intram_3; - unsigned intram_4; - unsigned char ram_5; - unsigned char ram_6; - unsigned short ram_7; - unsigned intmagic_id; - } _PACKED_; // 24 Bytes in total - -struct DT2_EEPROM_FC_CONFIG { - unsigned char rtc_sts_mask; - unsigned char rtc_sts_init; - unsigned char rtc_int_mask; - unsigned char rtc_int_init; - unsigned char rtc_atrim_init; - unsigned char rtc_dtrim_init; - unsigned char dummy1; - unsigned char dummy2; - unsigned char dt2_config_flags; /* 0x80 to load rtc_values to RTC */ - unsigned char dt2_revision; /* upper nibble is HW, lower nibble is FW */ - unsigned char dt2_serial_number[16]; /* Serial number of DT-2 */ - } _PACKED_; // 26 Bytes in total - -#define CFG_LOAD_RTC_VALUES0x80 - -struct DT2_EEPROM_GW_CONFIG { - unsigned intdummy1; - unsigned intdummy2; - unsigned intdummy3; - unsigned char dummy4; - unsigned char tos_video_val1; - unsigned char tos_video_val2; - unsigned char tos_voip_val; - unsigned char qos_igmp_cfg; - unsigned char num_of_ifs; - unsigned short vlan_ports_if[3]; - unsigned char mac_addr[3][6]; - } _PACKED_; // 42 Bytes in total - -#define _SIZE_OF_ALL_STRUCTS_ (sizeof(struct DT2_EEPROM_SD_CONFIG) + sizeof(struct DT2_EEPROM_FC_CONFIG) + sizeof(struct DT2_EEPROM_GW_CONFIG)) - -// MV = EEPROM - SD - FC - GW - CRC -struct DT2_EEPROM_MV_CONFIG { - unsigned int reg_addr[(DT2_EEPROM_LENGTH - _SIZE_OF_ALL_STRUCTS_ - sizeof(unsigned int)) / (sizeof(unsigned int) * 2)]; - unsigned int reg_data[(DT2_EEPROM_LENGTH - _SIZE_OF_ALL_STRUCTS_ - sizeof(unsigned int)) / (sizeof(unsigned int) * 2)]; - } _PACKED_; - -struct DT2_EEPROM_STRUCT { - struct DT2_EEPROM_MV_CONFIG mv; - struct DT2_EEPROM_SD_CONFIG sd; - struct DT2_EEPROM_FC_CONFIG fc; - struct DT2_EEPROM_GW_CONFIG gw; - unsigned intcrc; - } _PACKED_; - -#endif diff --git a/target/linux/orion/files/arch/arm/mach-orion5x/dt2-setup.c b/target/linux/orion/files/arch/arm/mach-orion5x/dt2-setup.c deleted file mode 100644 index a3d9c82..000 --- a/target/linux/orion/files/arch/arm/mach-orion5x/dt2-setup.c +++ /dev/null @@ -1,446 +0,0 @@ -/* - * arch/arm/mach-orion5x/dt2-setup.c - * - * Freecom DataTank Gateway Setup - * - * Copyright (C) 2009 Zintis Petersons zintis.peters...@abcsolutions.lv - * - * This file is licensed under the terms of the GNU General Public - * License version 2. This program is licensed as is without any - * warranty of any kind, whether express or implied. - */ - -#include linux/kernel.h -#include linux/init.h -#include linux/platform_device.h -#include linux/pci.h -#include linux/irq.h -#include linux/mtd/physmap.h -#include linux/mv643xx_eth.h -#include linux/ethtool.h -#include linux/if_ether.h -#include net/dsa.h -#include linux/ata_platform.h -#include linux/i2c.h -#include linux/reboot.h -#include linux/interrupt.h -#include asm/mach-types.h -#include asm/gpio.h -#include asm/leds.h -#include asm/mach/arch.h -#include asm/mach/pci.h -#include mach/orion5x.h -#include common.h -#include mpp.h - -/* - * DT2 local -
Re: [OpenWrt-Devel] [PATCH 1/5] [orion] move dt2 modifications to single patch
Please note that I have sent dt2 support update patch. -Original Message- From: openwrt-devel-boun...@lists.openwrt.org [mailto:openwrt-devel-boun...@lists.openwrt.org] On Behalf Of eugene...@gmail.com Sent: Monday, August 29, 2011 11:15 PM To: openwrt-devel@lists.openwrt.org Subject: [OpenWrt-Devel] [PATCH 1/5] [orion] move dt2 modifications to single patch From: Eugene San (eugenesan) eugene...@gmail.com Signed-off-by: Eugene San (eugenesan) eugene...@gmail.com --- .../orion/files/arch/arm/mach-orion5x/dt2-common.h | 82 --- .../orion/files/arch/arm/mach-orion5x/dt2-setup.c | 446 .../orion/patches/200-dt2_board_support.patch | 542 +++- 3 files changed, 527 insertions(+), 543 deletions(-) delete mode 100644 target/linux/orion/files/arch/arm/mach-orion5x/dt2-common.h delete mode 100644 target/linux/orion/files/arch/arm/mach-orion5x/dt2-setup.c diff --git a/target/linux/orion/files/arch/arm/mach-orion5x/dt2-common.h b/target/linux/orion/files/arch/arm/mach-orion5x/dt2-common.h deleted file mode 100644 index a54e188..000 --- a/target/linux/orion/files/arch/arm/mach-orion5x/dt2-common.h +++ /dev/null @@ -1,82 +0,0 @@ -#ifndef __INC_DT2_COMMON_H -#define __INC_DT2_COMMON_H - -#define ATAG_MV_UBOOT 0x41000403 - -struct tag_mv_uboot { - u32 uboot_version; - u32 tclk; - u32 sysclk; - u32 isUsbHost; - u32 overEthAddr; - u8 dt2_eeprom[256]; -}; - -#define DT2_EEPROM_ADDR0x50 -#define DT2_EEPROM_OFFSET 0 -#define DT2_EEPROM_LENGTH 256 - -#define DT2_SERIAL_NUMBER_DEFAULT run on default\0 -#define DT2_REVISION_DEFAULT_INIT 0xFF -#define DT2_CONFIG_FLAGS_DEFAULT 0x00 - -#define _PACKED_ __attribute__((packed)) - -struct DT2_EEPROM_SD_CONFIG { - unsigned intram_1; - unsigned intram_2; - unsigned intram_3; - unsigned intram_4; - unsigned char ram_5; - unsigned char ram_6; - unsigned short ram_7; - unsigned intmagic_id; - } _PACKED_; // 24 Bytes in total - -struct DT2_EEPROM_FC_CONFIG { - unsigned char rtc_sts_mask; - unsigned char rtc_sts_init; - unsigned char rtc_int_mask; - unsigned char rtc_int_init; - unsigned char rtc_atrim_init; - unsigned char rtc_dtrim_init; - unsigned char dummy1; - unsigned char dummy2; - unsigned char dt2_config_flags; /* 0x80 to load rtc_values to RTC */ - unsigned char dt2_revision; /* upper nibble is HW, lower nibble is FW */ - unsigned char dt2_serial_number[16]; /* Serial number of DT-2 */ - } _PACKED_; // 26 Bytes in total - -#define CFG_LOAD_RTC_VALUES0x80 - -struct DT2_EEPROM_GW_CONFIG { - unsigned intdummy1; - unsigned intdummy2; - unsigned intdummy3; - unsigned char dummy4; - unsigned char tos_video_val1; - unsigned char tos_video_val2; - unsigned char tos_voip_val; - unsigned char qos_igmp_cfg; - unsigned char num_of_ifs; - unsigned short vlan_ports_if[3]; - unsigned char mac_addr[3][6]; - } _PACKED_; // 42 Bytes in total - -#define _SIZE_OF_ALL_STRUCTS_ (sizeof(struct DT2_EEPROM_SD_CONFIG) + sizeof(struct DT2_EEPROM_FC_CONFIG) + sizeof(struct DT2_EEPROM_GW_CONFIG)) - -// MV = EEPROM - SD - FC - GW - CRC -struct DT2_EEPROM_MV_CONFIG { - unsigned int reg_addr[(DT2_EEPROM_LENGTH - _SIZE_OF_ALL_STRUCTS_ - sizeof(unsigned int)) / (sizeof(unsigned int) * 2)]; - unsigned int reg_data[(DT2_EEPROM_LENGTH - _SIZE_OF_ALL_STRUCTS_ - sizeof(unsigned int)) / (sizeof(unsigned int) * 2)]; - } _PACKED_; - -struct DT2_EEPROM_STRUCT { - struct DT2_EEPROM_MV_CONFIG mv; - struct DT2_EEPROM_SD_CONFIG sd; - struct DT2_EEPROM_FC_CONFIG fc; - struct DT2_EEPROM_GW_CONFIG gw; - unsigned intcrc; - } _PACKED_; - -#endif diff --git a/target/linux/orion/files/arch/arm/mach-orion5x/dt2-setup.c b/target/linux/orion/files/arch/arm/mach-orion5x/dt2-setup.c deleted file mode 100644 index a3d9c82..000 --- a/target/linux/orion/files/arch/arm/mach-orion5x/dt2-setup.c +++ /dev/null @@ -1,446 +0,0 @@ -/* - * arch/arm/mach-orion5x/dt2-setup.c - * - * Freecom DataTank Gateway Setup - * - * Copyright (C) 2009 Zintis Petersons zintis.peters...@abcsolutions.lv - * - * This file is licensed under the terms of the GNU General Public - * License version 2. This program is licensed as is without any - * warranty of any kind, whether express or implied. - */ - -#include linux/kernel.h -#include linux/init.h -#include linux/platform_device.h -#include linux/pci.h -#include linux/irq.h -#include linux/mtd/physmap.h -#include linux/mv643xx_eth.h -#include linux/ethtool.h -#include linux/if_ether.h -#include net/dsa.h -#include linux/ata_platform.h -#include linux