├── .gitignore ├── CHANGELOG ├── COPYING ├── CREDITS ├── MAINTAINERS ├── MAKEALL ├── MT7621A_defconfig ├── MT7621S_defconfig ├── Makefile ├── README ├── README.md ├── bin ├── MT7621A_uboot.bin └── MT7621S_uboot.bin ├── board └── rt2880 │ ├── Makefile │ ├── config.mk │ ├── flash.c │ ├── include │ ├── CpuCp0RegDef.h │ ├── aux_intc.h │ ├── aux_reg_map.h │ ├── chip_reg_map.h │ ├── compiler.h │ ├── cpu.h │ ├── cpu_except.h │ ├── ethernet.h │ ├── except.h │ ├── ide3710.h │ ├── intc.h │ ├── lcd.h │ ├── mac.h │ ├── mac.inc │ ├── mem_init.inc │ ├── mem_map.h │ ├── mem_map_1fc0.h │ ├── mem_tst.h │ ├── palmpak_tst.h │ ├── pio.h │ ├── product.h │ ├── pubdefs.h │ ├── regdef.h │ ├── sysc.h │ ├── timer.h │ └── uart.h │ ├── memsetup.S │ ├── rt2880.c │ ├── rt2880_init.S │ ├── serial.c │ ├── serial.h │ └── u-boot.lds ├── common ├── Makefile ├── cmd_bdinfo.c ├── cmd_boot.c ├── cmd_bootm.c ├── cmd_console.c ├── cmd_fat.c ├── cmd_flash.c ├── cmd_load.c ├── cmd_mem.c ├── cmd_misc.c ├── cmd_net.c ├── cmd_nvedit.c ├── cmd_usb.c ├── command.c ├── console.c ├── devices.c ├── dlmalloc.c ├── env_common.c ├── env_flash.c ├── env_nand.c ├── env_spi.c ├── environment.c ├── exports.c ├── flash.c ├── libcommon.a.map ├── lists.c ├── main.c ├── usb.c ├── usb_hub.c └── usb_storage.c ├── config.in ├── config.mk ├── cpu └── ralink_soc │ ├── Makefile │ ├── cache.S │ ├── config.mk │ ├── cpu.c │ ├── interrupts.c │ ├── start.S │ └── start_1004k.S ├── disk ├── Makefile ├── part.c ├── part_amiga.c ├── part_amiga.h ├── part_dos.c ├── part_dos.h ├── part_iso.c ├── part_iso.h ├── part_mac.c └── part_mac.h ├── doc ├── I2C_Edge_Conditions ├── README-i386 ├── README.ARM-SoC ├── README.ARM-memory-map ├── README.COBRA5272 ├── README.EVB-64260-750CX ├── README.INCA-IP ├── README.IPHASE4539 ├── README.IceCube ├── README.JFFS2 ├── README.JFFS2_NAND ├── README.MBX ├── README.MPC866 ├── README.Modem ├── README.NetConsole ├── README.OXC ├── README.PIP405 ├── README.POST ├── README.PXA_CF ├── README.Purple ├── README.RPXClassic ├── README.RPXlite ├── README.SBC8560 ├── README.Sandpoint8240 ├── README.TQM8260 ├── README.VLAN ├── README.adnpesc1 ├── README.adnpesc1_base32 ├── README.alaska8220 ├── README.amigaone ├── README.autoboot ├── README.bedbug ├── README.cmi ├── README.commands ├── README.commands.itest ├── README.console ├── README.db64360 ├── README.db64460 ├── README.dk1c20 ├── README.dk1c20_std32 ├── README.dk1s10 ├── README.dk1s10_mldk20 ├── README.dk1s10_std32 ├── README.dk1s40_std32 ├── README.dk20k200_std32 ├── README.ebony ├── README.evb64260 ├── README.fads ├── README.idma2intr ├── README.lynxkdi ├── README.m68k ├── README.ml300 ├── README.modnet50 ├── README.mpc5xx ├── README.mpc74xx ├── README.mpc85xxads ├── README.mpc85xxcds ├── README.nand ├── README.ne2000 ├── README.nios ├── README.nios_CFG_NIOS_CPU ├── README.nios_DK ├── README.ns9750dev ├── README.ocotea ├── README.omap730p2 ├── README.ppc440 ├── README.sched ├── README.serial_multi ├── README.silent ├── README.standalone ├── README.usb ├── README.video ├── README.xpedite1k └── TODO-i386 ├── drivers ├── MT7620_bmt.c ├── MT7620_bmt.h ├── Makefile ├── bbu_spiflash.h ├── ehci-core.h ├── ehci-hcd.c ├── ehci-ra.c ├── ehci.h ├── i2c_drv.c ├── mii_mgr.c ├── msdc │ ├── config.h │ ├── mmc_core.c │ ├── mmc_core.h │ ├── mmc_test.c │ ├── mmc_test.h │ ├── msdc.c │ ├── msdc.h │ ├── msdc_cust.c │ ├── msdc_cust.h │ ├── msg.h │ ├── sdio.h │ ├── ts_msdc.c │ └── utils.h ├── nand │ ├── bmt.c │ ├── bmt.h │ ├── mt6575_typedefs.h │ ├── mtk_nand.c │ ├── mtk_nand.h │ ├── nand_base.c │ ├── nand_def.h │ ├── nand_device_list.h │ └── nand_ids.c ├── nand_flash.c ├── ohci-hcd.c ├── ohci.h ├── phy_val.c ├── phy_val.h ├── ralink_nand.h ├── ralink_spi.h ├── rt2880_eth.c ├── spi_drv.c ├── spi_flash.c ├── spi_rt6855A_flash.c ├── usb │ └── host │ │ ├── mtk-phy-7621.c │ │ ├── mtk-phy-7621.h │ │ ├── mtk-phy-ahb.c │ │ ├── mtk-phy.c │ │ ├── mtk-phy.h │ │ ├── xhci-mem.c │ │ ├── xhci-mtk-power.c │ │ ├── xhci-mtk-power.h │ │ ├── xhci-mtk-scheduler.c │ │ ├── xhci-mtk-scheduler.h │ │ ├── xhci-mtk.c │ │ ├── xhci-mtk.h │ │ ├── xhci-ring.c │ │ ├── xhci.c │ │ └── xhci.h └── vtss.h ├── fs ├── Makefile └── fat │ ├── Makefile │ ├── fat.c │ ├── fat.c.old │ └── file.c ├── httpd ├── Makefile ├── fs.c ├── fs.h ├── fsdata.c ├── fsdata.h ├── httpd.c ├── httpd.h ├── main.c ├── tapdev.c ├── tapdev.h ├── uip.c ├── uip.h ├── uip_arch.c ├── uip_arch.h ├── uip_arp.c ├── uip_arp.h ├── uipopt.h └── vendors │ ├── dragino │ ├── 404.html │ ├── f.png │ ├── fail.html │ ├── flashing.html │ ├── index.html │ ├── l.png │ └── style.css │ ├── general │ ├── 404.html │ ├── art.html │ ├── fail.html │ ├── flashing.html │ ├── index.html │ ├── style.css │ └── uboot.html │ ├── makefsdatac │ ├── oem │ ├── 404.html │ ├── fail.html │ ├── flashing.html │ ├── index.html │ └── style.css │ ├── villagetelco │ ├── 404.html │ ├── fail.html │ ├── flashing.html │ ├── index.html │ ├── style.css │ ├── v.png │ └── vt.png │ └── yuicompressor-2.4.8.jar ├── include ├── ArchDefs.h ├── LzmaDecode.h ├── _exports.h ├── altera.h ├── asm-mips │ ├── addrspace.h │ ├── au1x00.h │ ├── bitops.h │ ├── byteorder.h │ ├── cachectl.h │ ├── cacheops.h │ ├── global_data.h │ ├── inca-ip.h │ ├── io.h │ ├── isadep.h │ ├── mipsregs.h │ ├── posix_types.h │ ├── processor.h │ ├── ptrace.h │ ├── reg.h │ ├── regdef.h │ ├── sgidefs.h │ ├── string.h │ ├── system.h │ ├── types.h │ └── u-boot.h ├── asm │ ├── addrspace.h │ ├── au1x00.h │ ├── bitops.h │ ├── byteorder.h │ ├── cache.h │ ├── cachectl.h │ ├── cacheops.h │ ├── errno-base.h │ ├── errno.h │ ├── global_data.h │ ├── inca-ip.h │ ├── io.h │ ├── isadep.h │ ├── mipsregs.h │ ├── posix_types.h │ ├── processor.h │ ├── ptrace.h │ ├── reg.h │ ├── regdef.h │ ├── sgidefs.h │ ├── string.h │ ├── system.h │ ├── types.h │ ├── u-boot.h │ └── unaligned.h ├── ata.h ├── bedbug │ ├── bedbug.h │ ├── ppc.h │ ├── regs.h │ ├── tables.h │ └── type.h ├── bmp_layout.h ├── bmp_logo.h ├── bzlib.h ├── circbuf.h ├── cmd_confdefs.h ├── command.h ├── common.h ├── compiler.h ├── config.h ├── config.mk ├── configs │ └── rt2880.h ├── console.h ├── devices.h ├── environment.h ├── exports.h ├── fat.h ├── fat_old.h ├── flash.h ├── fpga.h ├── hush.h ├── i2c.h ├── ide.h ├── image.h ├── kgdb.h ├── launch.h ├── led.h ├── linux │ ├── bitops.h │ ├── byteorder │ │ ├── big_endian.h │ │ ├── generic.h │ │ ├── little_endian.h │ │ └── swab.h │ ├── compiler-gcc.h │ ├── compiler-gcc3.h │ ├── compiler-gcc4.h │ ├── compiler.h │ ├── config.h │ ├── ctype.h │ ├── err.h │ ├── errno.h │ ├── mc146818rtc.h │ ├── mtd │ │ ├── bbm.h │ │ ├── doc2000.h │ │ ├── mtd.h │ │ ├── nand.h │ │ ├── nand_ecc.h │ │ ├── nand_ids.h │ │ └── nftl.h │ ├── posix_types.h │ ├── stat.h │ ├── stddef.h │ ├── string.h │ ├── time.h │ ├── types.h │ ├── unaligned │ │ ├── access_ok.h │ │ ├── be_byteshift.h │ │ ├── generic.h │ │ └── le_byteshift.h │ └── usb │ │ ├── atmel_usba_udc.h │ │ ├── cdc.h │ │ ├── ch9.h │ │ ├── composite.h │ │ ├── dwc3.h │ │ ├── gadget.h │ │ ├── musb.h │ │ └── xhci-omap.h ├── lists.h ├── logbuff.h ├── lzma │ ├── LzmaDec.h │ ├── LzmaTools.h │ └── LzmaTypes.h ├── malloc.h ├── mk48t59.h ├── mtd │ └── mtd-abi.h ├── nand_api.h ├── net.h ├── oled.h ├── part.h ├── post.h ├── rt_mmap.h ├── rtc.h ├── s_record.h ├── scsi.h ├── serial.h ├── spi.h ├── spi_api.h ├── sysdefs.h ├── systemace.h ├── unxz.h ├── usb.h ├── usb_defs.h ├── version.h ├── watchdog.h ├── wps.h ├── xilinx.h ├── xz.h └── zlib.h ├── lib_generic ├── LzmaDec.h ├── LzmaDecode.c ├── LzmaTools.h ├── Makefile ├── Types.h ├── bzlib.c ├── bzlib_crctable.c ├── bzlib_decompress.c ├── bzlib_huffman.c ├── bzlib_private.h ├── bzlib_randtable.c ├── crc32.c ├── ctype.c ├── decompress_unxz.c ├── display_options.c ├── string.c ├── vsprintf.c ├── xz_dec_bcj.c ├── xz_dec_lzma2.c ├── xz_dec_stream.c ├── xz_lzma2.h ├── xz_private.h ├── xz_stream.h └── zlib.c ├── lib_mips ├── Makefile ├── ashldi3.c ├── ashrdi3.c ├── board.c ├── ddr2.h ├── ddr3.h ├── ddr_init.c ├── libgcc.h ├── lshrdi3.c ├── mips_linux.c ├── mpll.h ├── mpll40Mhz.h └── time.c ├── mips_config.mk ├── mkconfig ├── mt7621_ddr.sh ├── mt7621_ddr_param.txt ├── mt7621_stage_L2.bin ├── mt7621_stage_sram.bin ├── net ├── Makefile ├── bootp.c ├── bootp.h ├── eth.c ├── httpd.c ├── httpd.h ├── net.c ├── rarp.c ├── rarp.h ├── tftp.c └── tftp.h ├── peripheral ├── Makefile ├── bmp.h ├── led.c ├── oled.c ├── oledfont.h └── wps.c ├── rtc ├── Makefile └── date.c ├── scripts ├── Configure ├── Makefile ├── Menuconfig ├── README.Menuconfig ├── README.uClinux ├── header.tk ├── lxdialog │ ├── BIG.FAT.WARNING │ ├── Makefile │ ├── checklist.c │ ├── colors.h │ ├── dialog.h │ ├── inputbox.c │ ├── lxdialog.c │ ├── menubox.c │ ├── msgbox.c │ ├── textbox.c │ ├── util.c │ └── yesno.c ├── tail.tk ├── tkcond.c ├── tkgen.c ├── tkparse.c └── tkparse.h ├── stage1 ├── Makefile ├── boot.c ├── gdma.c ├── nandc.c ├── stage1n2.lds └── start.S ├── toolchain ├── buildroot-gcc342.tar.bz2 └── mips-2012.03.tar.bz2 ├── tools ├── Makefile ├── crc.c ├── crc32.c ├── image.h └── mkimage.c └── uboot_version.h /.gitignore: -------------------------------------------------------------------------------- 1 | *.orig 2 | *.o 3 | *.a 4 | u-boot* 5 | .depend 6 | .config 7 | .menuconfig.log 8 | .tmp_config 9 | System.map 10 | autoconf.h 11 | tools/mkimage 12 | .config.old 13 | *~ 14 | *.old 15 | tags 16 | -------------------------------------------------------------------------------- /CHANGELOG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinney/MT7621-u-boot-mod/f546d5f423b00be6422703ef794b0526c9b74a4d/CHANGELOG -------------------------------------------------------------------------------- /CREDITS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinney/MT7621-u-boot-mod/f546d5f423b00be6422703ef794b0526c9b74a4d/CREDITS -------------------------------------------------------------------------------- /MAINTAINERS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinney/MT7621-u-boot-mod/f546d5f423b00be6422703ef794b0526c9b74a4d/MAINTAINERS -------------------------------------------------------------------------------- /MT7621A_defconfig: -------------------------------------------------------------------------------- 1 | # 2 | # Automatically generated by make menuconfig: don't edit 3 | # 4 | CONFIG_CROSS_COMPILER_PATH="/opt/mips-2012.03/bin/" 5 | ASIC_BOARD=y 6 | # RT2880_ASIC_BOARD is not set 7 | # RT3350_ASIC_BOARD is not set 8 | # RT3052_ASIC_BOARD is not set 9 | # RT3352_ASIC_BOARD is not set 10 | # RT3883_ASIC_BOARD is not set 11 | # RT5350_ASIC_BOARD is not set 12 | # RT6855A_ASIC_BOARD is not set 13 | # MT7620_ASIC_BOARD is not set 14 | MT7621_ASIC_BOARD=y 15 | # MT7628_ASIC_BOARD is not set 16 | MT7621_MP=y 17 | MT7621_USE_GE1=y 18 | # MT7621_USE_GE2 is not set 19 | # GE_MII_FORCE_100 is not set 20 | # GE_RVMII_FORCE_100 is not set 21 | # GE_MII_AN is not set 22 | GE_RGMII_FORCE_1000=y 23 | # GE_RGMII_AN is not set 24 | MAC_TO_MT7530_MODE=y 25 | GPIOx_RESET_MODE=y 26 | # ON_BOARD_NAND_FLASH_COMPONENT is not set 27 | ON_BOARD_SPI_FLASH_COMPONENT=y 28 | ON_BOARD_DDR3=y 29 | ON_BOARD_DDR_WIDTH_16=y 30 | ON_BOARD_16BIT_DRAM_BUS=y 31 | # ON_BOARD_512M_DRAM_COMPONENT is not set 32 | # ON_BOARD_1024M_DRAM_COMPONENT is not set 33 | # ON_BOARD_2048M_DRAM_COMPONENT is not set 34 | ON_BOARD_4096M_DRAM_COMPONENT=y 35 | MT7621_DDR_1200MHZ=y 36 | # MT7621_DDR_1066MHZ is not set 37 | # MT7621_DDR_800MHZ is not set 38 | # MT7621_DDR_400MHZ is not set 39 | MT7621_DDR_SPEED=11 40 | # MT7621_CPU_900MHZ is not set 41 | MT7621_CPU_880MHZ=y 42 | # MT7621_CPU_875MHZ is not set 43 | # MT7621_CPU_800MHZ is not set 44 | # MT7621_CPU_500MHZ is not set 45 | # MT7621_CPU_50MHZ is not set 46 | MT7621_CPU_FREQUENCY=370 47 | PDMA_NEW=y 48 | RX_SCATTER_GATTER_DMA=y 49 | # UBOOT_RAM is not set 50 | UBOOT_ROM=y 51 | # DUAL_IMAGE_SUPPORT is not set 52 | RALINK_DUAL_CORE_FUN=y 53 | RALINK_DUAL_VPE_FUN=y 54 | LAN_WAN_PARTITION=y 55 | RALINK_DEMO_BOARD_PVLAN=y 56 | DDR_ACT_SETTING=y 57 | # DEFAULT_DDR3_1024M is not set 58 | # DEFAULT_DDR3_2048M is not set 59 | DEFAULT_DDR3_4096M=y 60 | # DEFAULT_DDR2_512M is not set 61 | # W9751G6KB_A02_DDR2_1066_512M is not set 62 | # DEFAULT_DDR2_1024M is not set 63 | # W971GG6KB25_DDR2_800_1024M is not set 64 | # W971GG6KB18_DDR2_1066_1024M is not set 65 | DDR_CHIP=DEFAULT_DDR3_4096M 66 | TEXT_BASE=0xBFC00000 67 | -------------------------------------------------------------------------------- /MT7621S_defconfig: -------------------------------------------------------------------------------- 1 | # 2 | # Automatically generated by make menuconfig: don't edit 3 | # 4 | CONFIG_CROSS_COMPILER_PATH="/opt/mips-2012.03/bin/" 5 | ASIC_BOARD=y 6 | # RT2880_ASIC_BOARD is not set 7 | # RT3350_ASIC_BOARD is not set 8 | # RT3052_ASIC_BOARD is not set 9 | # RT3352_ASIC_BOARD is not set 10 | # RT3883_ASIC_BOARD is not set 11 | # RT5350_ASIC_BOARD is not set 12 | # RT6855A_ASIC_BOARD is not set 13 | # MT7620_ASIC_BOARD is not set 14 | MT7621_ASIC_BOARD=y 15 | # MT7628_ASIC_BOARD is not set 16 | MT7621_MP=y 17 | MT7621_USE_GE1=y 18 | # MT7621_USE_GE2 is not set 19 | # GE_MII_FORCE_100 is not set 20 | # GE_RVMII_FORCE_100 is not set 21 | # GE_MII_AN is not set 22 | GE_RGMII_FORCE_1000=y 23 | # GE_RGMII_AN is not set 24 | MAC_TO_MT7530_MODE=y 25 | GPIOx_RESET_MODE=y 26 | # ON_BOARD_NAND_FLASH_COMPONENT is not set 27 | ON_BOARD_SPI_FLASH_COMPONENT=y 28 | ON_BOARD_DDR3=y 29 | ON_BOARD_DDR_WIDTH_16=y 30 | ON_BOARD_16BIT_DRAM_BUS=y 31 | # ON_BOARD_512M_DRAM_COMPONENT is not set 32 | # ON_BOARD_1024M_DRAM_COMPONENT is not set 33 | # ON_BOARD_2048M_DRAM_COMPONENT is not set 34 | ON_BOARD_4096M_DRAM_COMPONENT=y 35 | MT7621_DDR_1200MHZ=y 36 | # MT7621_DDR_1066MHZ is not set 37 | # MT7621_DDR_800MHZ is not set 38 | # MT7621_DDR_400MHZ is not set 39 | MT7621_DDR_SPEED=11 40 | # MT7621_CPU_900MHZ is not set 41 | MT7621_CPU_880MHZ=y 42 | # MT7621_CPU_875MHZ is not set 43 | # MT7621_CPU_800MHZ is not set 44 | # MT7621_CPU_500MHZ is not set 45 | # MT7621_CPU_50MHZ is not set 46 | MT7621_CPU_FREQUENCY=370 47 | MT7621_UART_57600=y 48 | # MT7621_UART_115200 is not set 49 | MT7621_UART_BAUD=57600 50 | MT7621_UCLK_20M=1 51 | PDMA_NEW=y 52 | RX_SCATTER_GATTER_DMA=y 53 | # UBOOT_RAM is not set 54 | UBOOT_ROM=y 55 | # DUAL_IMAGE_SUPPORT is not set 56 | # RALINK_DUAL_CORE_FUN is not set 57 | RALINK_DUAL_VPE_FUN=y 58 | LAN_WAN_PARTITION=y 59 | RALINK_DEMO_BOARD_PVLAN=y 60 | DDR_ACT_SETTING=y 61 | # DEFAULT_DDR3_1024M is not set 62 | # DEFAULT_DDR3_2048M is not set 63 | DEFAULT_DDR3_4096M=y 64 | # DEFAULT_DDR2_512M is not set 65 | # W9751G6KB_A02_DDR2_1066_512M is not set 66 | # DEFAULT_DDR2_1024M is not set 67 | # W971GG6KB25_DDR2_800_1024M is not set 68 | # W971GG6KB18_DDR2_1066_1024M is not set 69 | DDR_CHIP=DEFAULT_DDR3_4096M 70 | TEXT_BASE=0xBFC00000 71 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | U-Boot modification for MT7621 Devices 2 | ========== 3 | Forked from FireWRT Uboot @ commit 4f84dbda5ccb762d92e6c13196d55d64334628d7 4 | 5 | **Flashing the bootloader is risky.** 6 | 7 | **If you like expensive bricks proceed without caution.** 8 | 9 | **You will need a working Serial Console and a TFTP server.** 10 | 11 | From the Serial Console (UART) : Option 9 12 | 13 | -------------------------------------------------------------------------------- /bin/MT7621A_uboot.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinney/MT7621-u-boot-mod/f546d5f423b00be6422703ef794b0526c9b74a4d/bin/MT7621A_uboot.bin -------------------------------------------------------------------------------- /bin/MT7621S_uboot.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinney/MT7621-u-boot-mod/f546d5f423b00be6422703ef794b0526c9b74a4d/bin/MT7621S_uboot.bin -------------------------------------------------------------------------------- /board/rt2880/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # (C) Copyright 2003 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | # 5 | # See file CREDITS for list of people who contributed to this 6 | # project. 7 | # 8 | # This program is free software; you can redistribute it and/or 9 | # modify it under the terms of the GNU General Public License as 10 | # published by the Free Software Foundation; either version 2 of 11 | # the License, or (at your option) any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program; if not, write to the Free Software 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | # MA 02111-1307 USA 22 | # 23 | 24 | include $(TOPDIR)/config.mk 25 | 26 | LIB = lib$(BOARD).a 27 | 28 | 29 | OBJS = $(BOARD).o serial.o 30 | ifeq ($(CFG_ENV_IS), IN_FLASH) 31 | OBJS += flash.o 32 | endif 33 | SOBJS = $(BOARD)_init.o memsetup.o 34 | 35 | $(LIB): .depend $(OBJS) $(SOBJS) 36 | $(AR) crv $@ $(OBJS) $(SOBJS) 37 | 38 | ######################################################################### 39 | 40 | .depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) 41 | $(CC) -M -g $(CFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c)> $@ 42 | 43 | sinclude .depend 44 | 45 | ######################################################################### 46 | -------------------------------------------------------------------------------- /board/rt2880/config.mk: -------------------------------------------------------------------------------- 1 | # 2 | # (C) Copyright 2003 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | # 5 | # See file CREDITS for list of people who contributed to this 6 | # project. 7 | # 8 | # This program is free software; you can redistribute it and/or 9 | # modify it under the terms of the GNU General Public License as 10 | # published by the Free Software Foundation; either version 2 of 11 | # the License, or (at your option) any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program; if not, write to the Free Software 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | # MA 02111-1307 USA 22 | # 23 | 24 | # 25 | # RT2880 board with MIPS 4Kec CPU core 26 | # 27 | 28 | # ROM version 29 | #TEXT_BASE = 0xBFC00000 30 | 31 | # RAM version 32 | #TEXT_BASE = 0x8A200000 33 | 34 | # ICE DEBUG version 35 | # SDRAM BASE 0x8A000000 36 | # Use top half of SDRAM(32M) as ROM 37 | #TEXT_BASE = 0x8B000000 38 | -------------------------------------------------------------------------------- /board/rt2880/u-boot.lds: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2003 3 | * Wolfgang Denk Engineering, 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | 24 | /* 25 | OUTPUT_FORMAT("elf32-bigmips", "elf32-bigmips", "elf32-bigmips") 26 | */ 27 | /*OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradbigmips")*/ 28 | OUTPUT_FORMAT("elf32-tradlittlemips", "elf32-tradbigmips", "elf32-tradlittlemips") 29 | OUTPUT_ARCH(mips) 30 | ENTRY(_start) 31 | 32 | SECTIONS 33 | { 34 | . = 0x00000000; 35 | 36 | . = ALIGN(4); 37 | .text : 38 | { 39 | *(.text) 40 | } 41 | 42 | . = ALIGN(4); 43 | .rodata : { *(.rodata) } 44 | 45 | . = ALIGN(4); 46 | 47 | .data : { *(.data) } 48 | 49 | . = ALIGN(4); 50 | .sdata : { *(.sdata) } 51 | 52 | _gp = ALIGN(16); 53 | 54 | .got : { 55 | __got_start = .; 56 | *(.got) 57 | __got_end = .; 58 | } 59 | 60 | .sdata : { *(.sdata) } 61 | 62 | __u_boot_cmd_start = .; 63 | .u_boot_cmd : { *(.u_boot_cmd) } 64 | __u_boot_cmd_end = .; 65 | 66 | uboot_end_data = .; 67 | num_got_entries = (__got_end - __got_start) >> 2; 68 | 69 | . = ALIGN(4); 70 | .sbss : { *(.sbss) } 71 | .bss : { *(.bss) } 72 | 73 | uboot_end = .; 74 | } 75 | 76 | 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /common/cmd_console.c: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2000 3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | 24 | /* 25 | * Boot support 26 | */ 27 | #include 28 | #include 29 | #include 30 | 31 | #if (CONFIG_COMMANDS & CFG_CMD_CONSOLE) 32 | #ifdef RT2880_U_BOOT_CMD_OPEN 33 | 34 | extern void _do_coninfo (void); 35 | int do_coninfo (cmd_tbl_t * cmd, int flag, int argc, char *argv[]) 36 | { 37 | int i, l; 38 | 39 | /* Scan for valid output and input devices */ 40 | 41 | puts ("List of available devices:\n"); 42 | 43 | for (i = 1; i <= ListNumItems (devlist); i++) { 44 | device_t *dev = ListGetPtrToItem (devlist, i); 45 | 46 | printf ("%-8s %08x %c%c%c ", 47 | dev->name, 48 | dev->flags, 49 | (dev->flags & DEV_FLAGS_SYSTEM) ? 'S' : '.', 50 | (dev->flags & DEV_FLAGS_INPUT) ? 'I' : '.', 51 | (dev->flags & DEV_FLAGS_OUTPUT) ? 'O' : '.'); 52 | 53 | for (l = 0; l < MAX_FILES; l++) { 54 | if (stdio_devices[l] == dev) { 55 | printf ("%s ", stdio_names[l]); 56 | } 57 | } 58 | putc ('\n'); 59 | } 60 | return 0; 61 | } 62 | 63 | 64 | /***************************************************/ 65 | 66 | U_BOOT_CMD( 67 | coninfo, 3, 1, do_coninfo, 68 | "coninfo - print console devices and information\n", 69 | "" 70 | ); 71 | #endif 72 | #endif /* CFG_CMD_CONSOLE */ 73 | -------------------------------------------------------------------------------- /common/cmd_misc.c: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2001 3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | 24 | /* 25 | * Misc functions 26 | */ 27 | #include 28 | #include 29 | 30 | #if (CONFIG_COMMANDS & CFG_CMD_MISC) 31 | #ifdef RT2880_U_BOOT_CMD_OPEN 32 | 33 | int do_sleep (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) 34 | { 35 | ulong delay; 36 | 37 | if (argc != 2) { 38 | printf ("Usage:\n%s\n", cmdtp->usage); 39 | return 1; 40 | } 41 | 42 | delay = simple_strtoul(argv[1], NULL, 10); 43 | 44 | while (delay) { 45 | int i; 46 | for (i=0; i<1000; ++i) { 47 | if (ctrlc ()) { 48 | return (-1); 49 | } 50 | udelay (1000); 51 | } 52 | --delay; 53 | } 54 | return 0; 55 | } 56 | #endif 57 | /* Implemented in $(CPU)/interrupts.c */ 58 | #if (CONFIG_COMMANDS & CFG_CMD_IRQ) 59 | int do_irqinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); 60 | 61 | U_BOOT_CMD( 62 | irqinfo, 1, 1, do_irqinfo, 63 | "irqinfo - print information about IRQs\n", 64 | NULL 65 | ); 66 | #endif /* CONFIG_COMMANDS & CFG_CMD_IRQ */ 67 | #ifdef RT2880_U_BOOT_CMD_OPEN 68 | 69 | U_BOOT_CMD( 70 | sleep , 2, 2, do_sleep, 71 | "sleep - delay execution for some time\n", 72 | "N\n" 73 | " - delay execution for N seconds (N is _decimal_ !!!)\n" 74 | ); 75 | #endif 76 | #endif /* CFG_CMD_MISC */ 77 | -------------------------------------------------------------------------------- /common/exports.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | static void dummy(void) 5 | { 6 | } 7 | 8 | unsigned long get_version(void) 9 | { 10 | return XF_VERSION; 11 | } 12 | 13 | void jumptable_init (void) 14 | { 15 | DECLARE_GLOBAL_DATA_PTR; 16 | int i; 17 | 18 | gd->jt = (void **) malloc (XF_MAX * sizeof (void *)); 19 | for (i = 0; i < XF_MAX; i++) 20 | gd->jt[i] = (void *) dummy; 21 | 22 | gd->jt[XF_get_version] = (void *) get_version; 23 | gd->jt[XF_malloc] = (void *) malloc; 24 | gd->jt[XF_free] = (void *) free; 25 | gd->jt[XF_get_timer] = (void *)get_timer; 26 | gd->jt[XF_udelay] = (void *)udelay; 27 | #if defined(CONFIG_I386) || defined(CONFIG_PPC) 28 | gd->jt[XF_install_hdlr] = (void *) irq_install_handler; 29 | gd->jt[XF_free_hdlr] = (void *) irq_free_handler; 30 | #endif /* I386 || PPC */ 31 | } 32 | -------------------------------------------------------------------------------- /cpu/ralink_soc/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # (C) Copyright 2003 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | # 5 | # See file CREDITS for list of people who contributed to this 6 | # project. 7 | # 8 | # This program is free software; you can redistribute it and/or 9 | # modify it under the terms of the GNU General Public License as 10 | # published by the Free Software Foundation; either version 2 of 11 | # the License, or (at your option) any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program; if not, write to the Free Software 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | # MA 02111-1307 USA 22 | # 23 | 24 | include $(TOPDIR)/config.mk 25 | 26 | LIB = lib$(CPU).a 27 | 28 | ifeq ($(MT7621_MP), y) 29 | START = start_1004k.o 30 | else 31 | START = start.o 32 | endif 33 | 34 | OBJS = cpu.o 35 | SOBJS = cache.o 36 | 37 | all: .depend $(START) $(LIB) 38 | 39 | $(LIB): $(OBJS) $(SOBJS) 40 | $(AR) crv $@ $(OBJS) $(SOBJS) 41 | 42 | ######################################################################### 43 | 44 | .depend: Makefile $(START:.o=.S) $(OBJS:.o=.c) 45 | $(CC) -M $(CFLAGS) $(START:.o=.S) $(OBJS:.o=.c) > $@ 46 | 47 | sinclude .depend 48 | 49 | ######################################################################### 50 | -------------------------------------------------------------------------------- /cpu/ralink_soc/config.mk: -------------------------------------------------------------------------------- 1 | # 2 | # (C) Copyright 2003 3 | # Wolfgang Denk, DENX Software Engineering, 4 | # 5 | # See file CREDITS for list of people who contributed to this 6 | # project. 7 | # 8 | # This program is free software; you can redistribute it and/or 9 | # modify it under the terms of the GNU General Public License as 10 | # published by the Free Software Foundation; either version 2 of 11 | # the License, or (at your option) any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program; if not, write to the Free Software 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | # MA 02111-1307 USA 22 | # 23 | v=$(shell \ 24 | $(AS) --version|grep "GNU assembler"|awk -F . '{print $$2}') 25 | MIPSFLAGS=$(shell \ 26 | if [ "$v" -lt "14" ]; then \ 27 | echo "-mabicalls"; \ 28 | else \ 29 | echo "-mabicalls"; \ 30 | fi) 31 | # Dennis Lee, Big Endian need -EB otherwise remove -EB 32 | # echo "-mcpu=4kc -EB -mabicalls"; 33 | # echo "-march=4kc -mtune=4kc -Wa,-mips_allow_branch_to_undefined -mabicalls"; 34 | PLATFORM_CPPFLAGS += $(MIPSFLAGS) 35 | -------------------------------------------------------------------------------- /cpu/ralink_soc/interrupts.c: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2003 3 | * Wolfgang Denk, DENX Software Engineering, 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | 24 | #include 25 | 26 | void enable_interrupts(void) 27 | { 28 | } 29 | 30 | int disable_interrupts(void) 31 | { 32 | return 0; 33 | } 34 | -------------------------------------------------------------------------------- /disk/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # (C) Copyright 2000 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | # 5 | # See file CREDITS for list of people who contributed to this 6 | # project. 7 | # 8 | # This program is free software; you can redistribute it and/or 9 | # modify it under the terms of the GNU General Public License as 10 | # published by the Free Software Foundation; either version 2 of 11 | # the License, or (at your option) any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program; if not, write to the Free Software 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | # MA 02111-1307 USA 22 | # 23 | 24 | include $(TOPDIR)/config.mk 25 | 26 | #CFLAGS += -DET_DEBUG -DDEBUG 27 | 28 | LIB = libdisk.a 29 | 30 | #OBJS = part.o part_mac.o part_dos.o part_iso.o part_amiga.o 31 | OBJS = part.o part_dos.o 32 | 33 | all: $(LIB) 34 | 35 | $(LIB): $(START) $(OBJS) 36 | $(AR) crv $@ $(OBJS) 37 | 38 | ######################################################################### 39 | 40 | .depend: Makefile $(OBJS:.o=.c) 41 | $(CC) -M $(CFLAGS) $(OBJS:.o=.c) > $@ 42 | 43 | sinclude .depend 44 | 45 | ######################################################################### 46 | -------------------------------------------------------------------------------- /disk/part_dos.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2000 3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | 24 | #ifndef _DISK_PART_DOS_H 25 | #define _DISK_PART_DOS_H 26 | 27 | 28 | #ifdef CONFIG_ISO_PARTITION 29 | /* Make the buffers bigger if ISO partition support is enabled -- CD-ROMS 30 | have 2048 byte blocks */ 31 | #define DEFAULT_SECTOR_SIZE 2048 32 | #else 33 | #define DEFAULT_SECTOR_SIZE 512 34 | #endif 35 | #define DOS_PART_TBL_OFFSET 0x1be 36 | #define DOS_PART_MAGIC_OFFSET 0x1fe 37 | #define DOS_PBR_FSTYPE_OFFSET 0x36 38 | #define DOS_PBR_MEDIA_TYPE_OFFSET 0x15 39 | #define DOS_MBR 0 40 | #define DOS_PBR 1 41 | 42 | typedef struct dos_partition { 43 | unsigned char boot_ind; /* 0x80 - active */ 44 | unsigned char head; /* starting head */ 45 | unsigned char sector; /* starting sector */ 46 | unsigned char cyl; /* starting cylinder */ 47 | unsigned char sys_ind; /* What partition type */ 48 | unsigned char end_head; /* end head */ 49 | unsigned char end_sector; /* end sector */ 50 | unsigned char end_cyl; /* end cylinder */ 51 | unsigned char start4[4]; /* starting sector counting from 0 */ 52 | unsigned char size4[4]; /* nr of sectors in partition */ 53 | } dos_partition_t; 54 | 55 | #endif /* _DISK_PART_DOS_H */ 56 | -------------------------------------------------------------------------------- /doc/I2C_Edge_Conditions: -------------------------------------------------------------------------------- 1 | I2C Edge Conditions: 2 | ==================== 3 | 4 | I2C devices may be left in a write state if a read was occuring 5 | and the CPU was reset. This may result in EEPROM data corruption. 6 | 7 | The edge condition is as follows: 8 | 1) A read operation begins. 9 | 2) I2C controller issues a start command. 10 | 3) The I2C writes the device address. 11 | 4) The CPU is reset at this point. 12 | 13 | Once the CPU reinitializes and the read is tried again: 14 | 1) The I2C controller issues a start command. 15 | 2) The I2C controller writes the device address. 16 | 3) The I2C controller writes the offset. 17 | 18 | The EEPROM sees: 19 | 1) START 20 | 2) device address 21 | 3) START "this start is ignored by most EEPROMs" 22 | 4) device address "EEPROM interprets this as offset" 23 | 5) Offset in device, "EEPROM interprets this as data to write" 24 | 25 | The device will interpret this sequence as a WRITE command and 26 | write rubbish into itself, i.e. the "offset" will be interpreted 27 | as data to be written in location "device address". 28 | 29 | Notes 30 | ----- 31 | !!!THIS IS AN UNDOCUMENTED I2C BUS BUG, NOT A IBM 4xx BUG!!! 32 | 33 | This reset edge condition could possibly be present in every I2C 34 | controller and device available. For boards where a I2C bus reset 35 | function can be implemented a i2c_init_board() function should be 36 | provided and enabled by #define'ing CFG_I2C_INIT_BOARD in your 37 | board's config file. Note that this is NOT necessary when using the 38 | bit-banging I2C driver (common/soft_i2c.c) as this already includes 39 | the I2C bus reset sequence. 40 | 41 | 42 | Many thanks to Bill Hunter for finding this serious BUG. 43 | email to: 44 | 45 | Erik Theisen 46 | Tue, 5 Mar 2002 23:02:19 -0500 (Wed 05:02 MET) 47 | -------------------------------------------------------------------------------- /doc/README-i386: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinney/MT7621-u-boot-mod/f546d5f423b00be6422703ef794b0526c9b74a4d/doc/README-i386 -------------------------------------------------------------------------------- /doc/README.ARM-SoC: -------------------------------------------------------------------------------- 1 | [By Steven Scholz , 16 Aug 2004] 2 | 3 | Since the cpu/ directory gets clobbered with peripheral driver code I 4 | started cleaning up cpu/arm920t. 5 | 6 | I introduced the concept of Soc (system on a chip) into the ./cpu 7 | directory. That means that code that is cpu (i.e. core) specific 8 | resides in 9 | 10 | cpu/$(CPU)/ 11 | 12 | and code that is specific to some SoC (i.e. vendor specific 13 | peripherals around the core) is moved into 14 | 15 | cpu/$(CPU)/$(SOC)/ 16 | 17 | Thus a library/archive "cpu/$(CPU)/$(SOC)/lib$(SOC).a" will be build 18 | and linked. Examples will be 19 | 20 | cpu/arm920t/imx/ 21 | cpu/arm920t/s3c24x0 22 | 23 | One can select an SoC by passing the name of it to ./mkconfig just 24 | like 25 | 26 | @./mkconfig $(@:_config=) arm arm920t vcma9 mpl s3c24x0 27 | 28 | If there's no VENDOR field (like "mpl" in the above line) one has to 29 | pass NULL instead: 30 | 31 | @./mkconfig $(@:_config=) arm arm920t mx1ads NULL imx 32 | -------------------------------------------------------------------------------- /doc/README.ARM-memory-map: -------------------------------------------------------------------------------- 1 | Subject: Re: [PATCH][CFT] bring ARM memory layout in line with the documented behaviour 2 | From: "Anders Larsen" 3 | Date: Thu, 18 Sep 2003 14:15:21 +0200 4 | To: Wolfgang Denk 5 | 6 | ... 7 | >I still see references to _armboot_start, _armboot_end_data, and 8 | >_armboot_end - which role do these play now? Can we get rid of them? 9 | > 10 | >How are they (should they be) set in your memory map above? 11 | 12 | _armboot_start contains the value of TEXT_BASE (0xA07E0000); it seems 13 | TEXT_BASE and _armboot_start are both used for the same purpose in 14 | different parts of the (ARM) code. 15 | Furthermore, the startup code (cpu//start.S) internally uses 16 | another variable (_TEXT_BASE) with the same content as _armboot_start. 17 | I agree that this mess should be cleaned up. 18 | -------------------------------------------------------------------------------- /doc/README.EVB-64260-750CX: -------------------------------------------------------------------------------- 1 | The EVB-64260-750CX is quite similar to the EVB-64260-BP already 2 | supported except the following differences: 3 | * It has an IBM-750CXe soldiered on board instead of the slot-1 in the 4 | BP. 5 | * It has a single PCI male connector instead of the 4 PCI female 6 | connectors on the BP. It also gets power trough the PCI connector. 7 | * It has only a single DIMM slot instead of the 2 slots in the BP. 8 | -------------------------------------------------------------------------------- /doc/README.IceCube: -------------------------------------------------------------------------------- 1 | --------------------------------------------------------------------------- 2 | Build target Flash address | BDI "go" command | Reset Vector 3 | --------------------------------------------------------------------------- 4 | Lite5200 0xFFF00000 | 0xFFF00100 | 0xFFF00100 5 | Lite5200_LOWBOOT 0xFF000000 | 0xFF000100 | 0x00000100 6 | Lite5200_LOWBOOT08 0xFF800000 | 0xFF800100 | 0x00000100 7 | icecube_5200 0xFFF00000 | 0xFFF00100 | 0xFFF00100 8 | icecube_5200_LOWBOOT 0xFF000000 | 0xFF000100 | 0x00000100 9 | icecube_5200_LOWBOOT08 0xFF800000 | 0xFF800100 | 0x00000100 10 | icecube_5200_DDR 0xFFF00000 | 0xFFF00100 | 0xFFF00100 11 | icecube_5200_DDR_LOWBOOT 0xFF800000 | 0xFF800100 | 0x00000100 12 | icecube_5200_DDR_LOWBOOT08 0xFF800000 | 0xFF800100 | 0x00000100 13 | --------------------------------------------------------------------------- 14 | -------------------------------------------------------------------------------- /doc/README.JFFS2_NAND: -------------------------------------------------------------------------------- 1 | JFFS2 NAND support: 2 | 3 | To ebable, use the following #define in the board configuration file: 4 | 5 | #define CONFIG_JFFS2_NAND 1 6 | 7 | Configuration of partitions is similar to how this is done in U-Boot 8 | for JFFS2 on top NOR flash. If a single parition is used, it can be 9 | configured using the following #defines in the configuration file: 10 | 11 | #define CONFIG_JFFS2_NAND_DEV 0 /* nand device jffs2 lives on */ 12 | #define CONFIG_JFFS2_NAND_OFF 0 /* start of jffs2 partition */ 13 | #define CONFIG_JFFS2_NAND_SIZE 2*1024*1024 /* size of jffs2 partition */ 14 | 15 | If more than a single partition is desired, the user can define a 16 | CFG_JFFS_CUSTOM_PART macro and implement a 17 | 18 | struct part_info* jffs2_part_info(int part_num) 19 | 20 | function in a board-specific module. An example of such function is 21 | available in common/cmd_jffs2.c 22 | 23 | The default configuration for the DAVE board has a single JFFS2 24 | partition of 2 MB size. 25 | -------------------------------------------------------------------------------- /doc/README.MPC866: -------------------------------------------------------------------------------- 1 | The current implementation allows the user to specify the desired CPU 2 | clock value, in MHz, via an environment variable "cpuclk". 3 | 4 | Four compile-time constants are used: 5 | 6 | CONFIG_8xx_OSCLK - input quartz clock 7 | CFG_8xx_CPUCLK_MIN - minimum allowed CPU clock 8 | CFG_8xx_CPUCLK_MAX - maximum allowed CPU clock 9 | CONFIG_8xx_CPUCLK_DEFAULT - default CPU clock value 10 | 11 | If the "cpuclk" environment variable value is within the CPUCLK_MIN / 12 | CPUCLK_MAX limits, the specified value is used. Otherwise, the 13 | default CPU clock value is set. 14 | 15 | Please make sure you understand what you are doing, and understand 16 | the restrictions of your hardware (board, processor). For example, 17 | ethernet will stop working for CPU clock frequencies below 25 MHz. 18 | 19 | Please note that the new clock-handling code is enabled if 20 | CONFIG_8xx_CPUCLK_DEFAULT is defined. Since this mechanism supports 21 | only MPC866 and newer CPUs, this constant MUST NOT be defined for 22 | MPC823/850/860/862 series. The clock generation algorithm for older 23 | chips is different and has not been implemented yet. If you need it, 24 | your patch is welcome. 25 | -------------------------------------------------------------------------------- /doc/README.OXC: -------------------------------------------------------------------------------- 1 | This document contains different information about the port 2 | of U-Boot for the OXC board designed by Lucent Technologies, 3 | Inc. 4 | 5 | 1. Showing activity 6 | 7 | U-Boot for the OXC board can show its current status using 8 | the Active LED. This feature is configured by the following 9 | options: 10 | 11 | CONFIG_SHOW_ACTIVITY 12 | 13 | When this option is on, the Active LED is blinking fast 14 | when U-Boot runs in the idle loop (i.e. waits for user 15 | commands from serial console) and blinking slow when it 16 | downloads an image over network. When U-Boot loads an image 17 | over serial line the Active LED does not blink and its state 18 | is random (i.e. either constant on or constant off). 19 | 20 | CONFIG_SHOW_BOOT_PROGRESS 21 | 22 | When this option is on, U-Boot switches the Active LED 23 | off before booting an image and switches it on if booting 24 | failed due to some reasons. 25 | -------------------------------------------------------------------------------- /doc/README.PXA_CF: -------------------------------------------------------------------------------- 1 | 2 | These are brief instructions on how to add support for CF adapters to 3 | custom designed PXA boards. You need to set the parameters in the 4 | config file. This should work for most implementations especially if you 5 | follow the connections of the standard lubbock. Anyway just the block 6 | marked memory configuration should be touched since the other parameters 7 | are imposed by the PXA architecture. 8 | 9 | #define CONFIG_PXA_PCMCIA 1 10 | #define CONFIG_PXA_IDE 1 11 | 12 | #define CONFIG_PCMCIA_SLOT_A 1 13 | /* just to keep build system happy */ 14 | 15 | #define CFG_PCMCIA_MEM_ADDR 0x28000000 16 | #define CFG_PCMCIA_MEM_SIZE 0x10000000 17 | 18 | #define CFG_MECR_VAL 0x00000000 19 | #define CFG_MCMEM0_VAL 0x00004204 20 | #define CFG_MCMEM1_VAL 0x00000000 21 | #define CFG_MCATT0_VAL 0x00010504 22 | #define CFG_MCATT1_VAL 0x00000000 23 | #define CFG_MCIO0_VAL 0x00008407 24 | #define CFG_MCIO1_VAL 0x00000000 25 | /* memory configuration */ 26 | 27 | #define CFG_IDE_MAXBUS 1 28 | /* max. 1 IDE bus */ 29 | #define CFG_IDE_MAXDEVICE 1 30 | /* max. 1 drive per IDE bus */ 31 | 32 | #define CFG_ATA_IDE0_OFFSET 0x0000 33 | 34 | #define CFG_ATA_BASE_ADDR 0x20000000 35 | 36 | /* Offset for data I/O */ 37 | #define CFG_ATA_DATA_OFFSET 0x1f0 38 | 39 | /* Offset for normal register accesses */ 40 | #define CFG_ATA_REG_OFFSET 0x1f0 41 | 42 | /* Offset for alternate registers */ 43 | #define CFG_ATA_ALT_OFFSET 0x3f0 44 | 45 | 46 | Another important point is that maybe you have to power the pcmcia 47 | subsystem. This is very board specific, for an example on how to 48 | do it please search for CONFIG_EXADRON1 in cmd_pcmcia.c 49 | -------------------------------------------------------------------------------- /doc/README.Purple: -------------------------------------------------------------------------------- 1 | Installation Instructions: 2 | -------------------------- 3 | 4 | 1. Put the s2 switch into the following position: 5 | 6 | Off On 7 | ------ 8 | |x | 9 | | x| 10 | |x | 11 | | X| 12 | ------ 13 | 14 | Put the s3 switch into the following position: 15 | 16 | Off On 17 | ------ 18 | | x | 19 | | x | 20 | | x| 21 | | x| 22 | ------ 23 | 24 | Put the s4 switch into the following position: 25 | 26 | Off On 27 | ------ 28 | |x | 29 | |x | 30 | |x | 31 | |x | 32 | |x | 33 | | x| 34 | | x| 35 | |x | 36 | ------ 37 | 38 | 2. Connect to the serial console and to the BDI. Power on. On the 39 | serial line, you should see: 40 | 41 | PURPLE@1.2> 42 | 43 | 3. Type '8'. No echo will be displayed. In response, you should get: 44 | 45 | 7A(pass) 46 | 47 | 4. From BDI, enter command: 48 | 49 | mmw 0xb800d860 0x0042c7ff 50 | 51 | 5. Then, from BDI: 52 | 53 | erase 0xB0000000 54 | erase 0xB0008000 55 | erase 0xB000C000 56 | erase 0xB0010000 57 | erase 0xB0020000 58 | 59 | prog 0xB0000000 bin 60 | 61 | 6. Power off. Restore the original S2 switch position: 62 | 63 | Off On 64 | ------ 65 | | x| 66 | | x| 67 | |x | 68 | | X| 69 | ------ 70 | 71 | Power on. U-Boot should come up. 72 | 73 | 74 | Implementation Notes: 75 | --------------------- 76 | 77 | Due to the RAM/flash bus arbitration problem the suggested workaround 78 | had to be implemented. It works okay. On the downside is that you 79 | can't really check whether 'erase' is complete by polling flash as it 80 | is usually done. Instead, the flash driver simply waits for a given 81 | time and assumes that erase then has passed. This behaviour is 82 | identical to what the VxWorks driver does; also, the same timeout (6 83 | seconds) was chosen. Note that this timeout applies for each erase 84 | operation, i. e. per erased sector. 85 | -------------------------------------------------------------------------------- /doc/README.RPXClassic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinney/MT7621-u-boot-mod/f546d5f423b00be6422703ef794b0526c9b74a4d/doc/README.RPXClassic -------------------------------------------------------------------------------- /doc/README.SBC8560: -------------------------------------------------------------------------------- 1 | The port was tested on Wind River System Sbc8560 board . 2 | U-Boot was installed on the flash memory of the CPU card (no the SODIMM). 3 | 4 | NOTE: Please configure uboot compile to the proper PCI frequency and 5 | setup the appropriate DIP switch settings. 6 | 7 | SBC8560 board: 8 | 9 | Make sure boards switches are set to their appropriate conditions. 10 | Refer to the Engineering Reference Guide ERG-00300-002. Of particular 11 | importance are: 1)Tthe settings for JP4 (JP4 1-3 and 2-4), which 12 | select the on-board FLASH device (Intel 28F128Jx); 2) The settings 13 | for the Clock SW9 (33 MHz or 66 MHz). 14 | 15 | Note: SW9 Settings: 66 MHz 16 | 4:1 ratio CCB clocks:SYSCLK 17 | 3:1 ration e500 Core:CCB 18 | pos1 - on, pos2 - on, pos3 - off, pos4 - on, pos5 - off, pos6 - on 19 | Note: SW9 Settings: 33 MHz 20 | 8:1 ratio CCB clocks:SYSCLK 21 | 3:1 ration e500 Core:CCB 22 | pos1 - on, pos2 - on, pos3 - on, pos4 - off, pos5 - off, pos6 - on 23 | 24 | 25 | Flashing the FLASH device with the "Wind River ICE": 26 | 27 | 1) Properly connect and configure the Wind River ICE to the 28 | target JTAG port. This includes running the SBC8560 register script. 29 | Make sure target memory can be read and written. 30 | 31 | 2) Build the u-boot image: 32 | make distclean 33 | make SBC8560_66_config or SBC8560_33_config 34 | make CROSS_COMPILE=.../ELDK3.0/ppc_8xx-/ all 35 | 36 | Note: reference is made to the ELDK3.0 compiler but any 85xx cross-compiler 37 | should suffice. 38 | 39 | 3) Convert the uboot (.elf) file to a uboot.bin file (using visionClick converter). 40 | The bin file should be converted from fffc0000 to ffffffff 41 | 42 | 4) Setup the Flash Utility (tools menu) for: 43 | 44 | Determine the clock speed of the PCI bus and set SW9 accordingly 45 | Note: the speed of the PCI bus defaults to the slowest PCI card 46 | PlayBack the "default" register file for the SBC8560 47 | Select the uboot.bin file with zero bias 48 | Select the initialize Target prior to programming 49 | Select the V28F640Jx (8192 x 8) 1 device FLASH Algorithm 50 | Select the erase base address from FFFC0000 to FFFFFFFF 51 | Select the start address from 0 with size of 4000 52 | 53 | 5) Erase and Program 54 | -------------------------------------------------------------------------------- /doc/README.VLAN: -------------------------------------------------------------------------------- 1 | U-Boot has networking support for VLANs (802.1q), and CDP (Cisco 2 | Discovery Protocol). 3 | 4 | You control the sending/receiving of VLAN tagged packets with the 5 | "vlan" environmental variable. When not present no tagging is 6 | performed. 7 | 8 | CDP is used mainly to discover your device VLAN(s) when connected to 9 | a Cisco switch. 10 | 11 | Note: In order to enable CDP support a small change is needed in the 12 | networking driver. You have to enable reception of the 13 | 01:00:0c:cc:cc:cc MAC address which is a multicast address. 14 | 15 | Various defines control CDP; see the README section. 16 | -------------------------------------------------------------------------------- /doc/README.amigaone: -------------------------------------------------------------------------------- 1 | AmigaOne U-Boot and the SciTech emulator 2 | 3 | The directory board/MAI/bios_emulator contains the source code 4 | of the SciTech x86 emulator. This emulator is normally available 5 | under a BSD license. However, SciTech kindly gave us permission 6 | to use their emulator in PPCBoot for the AmigaOne. It's available 7 | in this form only under GPL. 8 | 9 | Thanks to Kendall Bennett and the rest of the team at SciTech. 10 | See http://www.scitechsoft.com for their web site 11 | 12 | The GPL license can be found at http://www.gnu.org/licenses/gpl.html 13 | -------------------------------------------------------------------------------- /doc/README.cmi: -------------------------------------------------------------------------------- 1 | 2 | Summary: 3 | ======== 4 | 5 | This file contains information about the cmi board configuration. 6 | Please see cmi_mpc5xx_config for further details. The cmi board is 7 | a customer specific board but should work with small modifications 8 | on every board which has a MPC5xx and either a 28F128J3A, 9 | 28F320J3A or 28F640J3A Intel flash mounted. 10 | 11 | Board Discription: 12 | ================== 13 | 14 | * Motorola MPC555 15 | * RS232 connection 16 | * Intel flash 28F640J3A 17 | * Micron SRAM 1M 18 | * Altera PLD 19 | 20 | Bootstrap: 21 | ========== 22 | 23 | In contrast to the usual boot sequence used in U-Boot, on the 24 | cmi board we don't boot from the external flash directly. 25 | Because of we use a 16-bit flash and don't sample a RCW 26 | from the data bus to set the startup buswidth to 16-bit. 27 | Unfortunatly the default width, sampled from the default RCW 28 | is 32-bit. For this reason we burn the proper RCW into the 29 | internal flash shadow location and boot after power-on or 30 | reset from the internal flash and then branch to 0x02000100 31 | where the U-Boot reset vector handler is located. 32 | 33 | Memory Map: 34 | =========== 35 | 36 | Memory Map after relocation: 37 | 38 | 0x0000 0000 CFG_SDRAM_BASE 39 | : 40 | 0x000F 9FFF 41 | : 42 | : 43 | 0x0100 0000 CFG_IMMR (Internal memory map base adress) 44 | : 45 | 0x0130 7FFF 46 | : 47 | : 48 | 0x0200 0000 CFG_FLASH_BASE 49 | : 50 | 0x027C FFFF 51 | : 52 | : 53 | 0x0300 0000 PLD_BASE 54 | 55 | Flash Partition: 56 | 57 | 0x0200 0000 Block 0 and 1 contain U-Boot except 58 | : environment 59 | : 60 | 0x0201 FFFF 61 | 0x0202 0000 Block 2 contains environment (.ppcenv) 62 | : 63 | 0x0202 FFFF 64 | 65 | See README file for futher information about U-Boot relocation 66 | and partitioning. 67 | 68 | Tested Features: 69 | ================ 70 | 71 | * U-Boot commands: go, loads, loadb, all memory features, printenv, 72 | setenv, saveenv, protect, erase, fli, bdi, mtest, reset, version, 73 | coninfo, help (see configuration file for available commands) 74 | 75 | * Blinking led to indicate boot process 76 | 77 | Added or Changed Files: 78 | ======================= 79 | 80 | u-boot-0.2.0/board/cmi/* 81 | u-boot-0.2.0/include/configs/cmi_mpc5xx.h 82 | 83 | Regards, 84 | Martin 85 | -------------------------------------------------------------------------------- /doc/README.commands: -------------------------------------------------------------------------------- 1 | 2 | Commands are added to U-Boot by creating a new command structure. 3 | This is done by first including command.h 4 | 5 | Then using the U_BOOT_CMD() macro to fill in a cmd_tbl_t struct. 6 | 7 | U_BOOT_CMD(name,maxargs,repeatable,command,"usage","help") 8 | 9 | name: is the name of the commad. THIS IS NOT a string. 10 | maxargs: the maximumn numbers of arguments this function takes 11 | command: Function pointer (*cmd)(struct cmd_tbl_s *, int, int, char *[]); 12 | usage: Short description. This is a string 13 | help: long description. This is a string 14 | 15 | 16 | **** Behinde the scene ****** 17 | 18 | The structure created is named with a special prefix (__u_boot_cmd_) 19 | and placed by the linker in a special section. 20 | 21 | This makes it possible for the final link to extract all commands 22 | compiled into any object code and construct a static array so the 23 | command can be found in an array starting at __u_boot_cmd_start. 24 | 25 | If a new board is defined do not forget to define the command section 26 | by writing in u-boot.lds ($(TOPDIR)/board/boardname/u-boot.lds) these 27 | 3 lines: 28 | 29 | __u_boot_cmd_start = .; 30 | .u_boot_cmd : { *(.u_boot_cmd) } 31 | __u_boot_cmd_end = .; 32 | -------------------------------------------------------------------------------- /doc/README.commands.itest: -------------------------------------------------------------------------------- 1 | A slow day today so here is a revised itest command with provisional 2 | support for comparing strings as well :-)) 3 | 4 | Now table driven to allow the operators 5 | -eq, -ne, -lt, -gt, -le, -ge, ==, !=, <>, <, >, <=, >= 6 | 7 | Uses the expected command modifier for integer compares of width 1, 2 or 8 | 4 bytes of .b, .w, .l and the new modifer of .s for a string compare. 9 | String comparison is over the length of the shorter, this hopefully 10 | avoids missing terminators when using an indirect pointer. 11 | 12 | eg. 13 | if itest.l *40000 == 12345678 then; .... 14 | if itest.w *40000 != 1234 then; .... 15 | if itest.b *40000 >= 12 then; .... 16 | if itest.s *40000 -eq hello then; .... 17 | -------------------------------------------------------------------------------- /doc/README.evb64260: -------------------------------------------------------------------------------- 1 | This file contains status information for the port of U-Boot to the 2 | Galileo Evaluation Board. 3 | 4 | Author: Josh Huber 5 | Mission Critical Linux, Inc. 6 | 7 | The support for the Galileo Evaluation board is fairly minimal now. 8 | It's sufficient to boot Linux, but doesn't provide too much more than 9 | what's required to do this. 10 | 11 | Both DUART channels are supported (to use the second one, you have to 12 | modify the board -- see the schematics for where to solder on the 13 | devices module). The ethernet ports are supported, and the MPSC is 14 | supported as a console driver. (keep in mind that the kernel has no 15 | support for this yet) 16 | 17 | There are still occaisonal lockups with the MPSC console driver due to 18 | (we think!) overrun problems. If you're looking for something stable 19 | to use for Linux development, consider sticking with the DUART console 20 | for now. 21 | 22 | Automatic memory sizing mostly works. We've had problems with some 23 | combinations of memory. Please send us email if you're having trouble 24 | with respect to the memory detection. 25 | 26 | Right now, only the 512k boot flash is supported. Support for the 27 | 16MB flash on the devices module is forthcoming. Right now the flash 28 | is stored at the 256k boundry in flash, wasting a whole sector (64k!) 29 | for environment data. This isn't really a big deal since we're not 30 | using the 512k for anything else. (Just U-Boot and the environment) 31 | 32 | Finally, here is a sample output session: 33 | 34 | U-Boot 1.0.0-pre1 (Jun 6 2001 - 12:45:11) 35 | 36 | Initializing... 37 | CPU: MPC7400 (altivec enabled) v2.9 38 | Board: EVB64260 39 | DRAM: 256 MB 40 | FLASH: 512 kB 41 | In: serial 42 | Out: serial 43 | Err: serial 44 | 45 | => 46 | 47 | The default configuration should be correct for the evaluation board, 48 | as it's shipped from Galileo. Keep in mind that the default baudrate 49 | is set to 38400, 8N1. 50 | 51 | Good luck, and make sure to send any bugreports to us (or the 52 | u-boot-users list). 53 | 54 | Josh 55 | -------------------------------------------------------------------------------- /doc/README.idma2intr: -------------------------------------------------------------------------------- 1 | (C) 2003 Arun Dharankar 2 | 3 | Attached is an IDMA example code for MPC8260/PPCBoot. I had tried to 4 | search around and could not find any for implementing IDMA, so 5 | implemented one. Its not coded in the best way, but works. 6 | 7 | Also, I was able to test the IDMA specific code under Linux also 8 | (with modifications). My requirement was to implement it for 9 | CompactFlash implemented in memory mode, and it works for it under 10 | PPCBoot and Linux. 11 | -------------------------------------------------------------------------------- /doc/README.lynxkdi: -------------------------------------------------------------------------------- 1 | LYNX KDI SUPPORT 2 | 3 | Last Update: July 20, 2003 4 | ======================================================================= 5 | 6 | This file describes support for LynuxWorks KDI within U-Boot. Support 7 | is enabled by defining CONFIG_LYNXKDI. 8 | 9 | 10 | LYNXOS AND BLUECAT SUPPORTED 11 | ============================ 12 | Both LynxOS and BlueCat linux KDIs are supported. The implementation 13 | automatically detects which is being booted. When you use mkimage 14 | you should specify "lynxos" for both (see target-specific notes). 15 | 16 | 17 | SUPPORTED ARCHITECTURE/TARGETS 18 | ============================== 19 | The following targets have been tested: 20 | 21 | -PowerPC MPC8260ADS 22 | 23 | 24 | FILES TO LOOK AT 25 | ================ 26 | include/lynxkdi.h -defines a simple struct passed to a kdi. 27 | common/lynxkdi.c -implements the call to the kdi. 28 | common/cmd_bootm.c -top-level command implementation ("bootm"). 29 | 30 | 31 | ==================================================================== 32 | TARGET SPECIFIC NOTES 33 | ==================================================================== 34 | 35 | MPC8260ADS 36 | =========== 37 | The default LynxOS and BlueCat implementations require some 38 | modifications to the config file. 39 | 40 | Edit include/configs/MPC8260ADS.h to use the following: 41 | 42 | #define CFG_IMMR 0xFA200000 43 | #define CFG_BCSR 0xFA100000 44 | #define CFG_BR1_PRELIM 0xFA101801 45 | 46 | When creating a LynxOS or BlueCat u-boot image using mkimage, 47 | you must specify the following: 48 | 49 | Both: -A ppc -O lynxos -T kernel -C none 50 | LynxOS: -a 0x00004000 -e 0x00004020 51 | BlueCat: -a 0x00500000 -e 0x00507000 52 | 53 | To pass the MAC address to BlueCat you should define the 54 | "fcc2_ether_addr" parameter in the "bootargs" environment 55 | variable. E.g.: 56 | 57 | ==> setenv bootargs fcc2_ether_addr=00:11:22:33:44:55:66 58 | -------------------------------------------------------------------------------- /doc/README.modnet50: -------------------------------------------------------------------------------- 1 | U-BOOT Port for FSForth ModNET50 Board 2 | -------------------------------------- 3 | 4 | author: Thomas Elste 5 | IMMS gGmbH 6 | 7 | The port based upon an early (partial complete) 8 | armboot-port from Stephan Linz for the ModNET50 Board. 9 | 10 | 11 | Overview: 12 | 13 | - board with Netsilicon NET+50 ARM7TDMI CPU without MMU 14 | - 16 MB SDRAM 15 | - 2 MB Flash (MBL29LV160BE) 16 | - 10/100 Ethernet PHY (LXT971A) 17 | 18 | 19 | Current Configuration (include/configs/modnet50.h): 20 | 21 | Memory Map: 0x00000000 - 0x00FFFFFF 16M SDRAM 22 | 0x10000000 - 0x101FFFFF 2M Flash 23 | 24 | The Flash uses a BB-Architectur with 35 sectors 25 | (0:16K; 1,2:8K; 3:32K; 4-34:64K). U-Boot is located in 26 | the first 5 sectors. 27 | 28 | The environment is located at the end of the 4th Flash 29 | sector (0x1001C000-0x1001FFFF). 30 | 31 | Build: 32 | 33 | U-boot should be build by using the ELDK Toolchain (arm-linux-*). 34 | 35 | make modnet50_config 36 | make 37 | 38 | 39 | Status: 40 | 41 | Everything seems to work fine. Booting images was tested by 42 | booting uCLinux (with and without a separate ramdisk image) from 43 | flash. 44 | 45 | 46 | Files: 47 | 48 | cpu/arm720t/serial_netarm.c .. serial I/O for the cpu 49 | 50 | board/modnet50/memsetup.S .. memory setup for ModNET50 51 | board/modnet50/flash.c .. flash routines 52 | board/modnet50/modnet50.c .. some board init stuff 53 | 54 | drivers/netarm_eth.c .. ethernet driver for the NET+50 CPU 55 | drivers/netarm_eth.h .. header for ethernet driver 56 | 57 | include/configs/modnet50.h .. configuration file for ModNET50 58 | 59 | include/netarm_*.h .. register and macro definitions for 60 | the NETARM CPU family 61 | 62 | doc/README.modnet50 .. this readme 63 | -------------------------------------------------------------------------------- /doc/README.mpc5xx: -------------------------------------------------------------------------------- 1 | 2 | Summary: 3 | ======== 4 | 5 | This file contains information about the port of U-Boot to the 6 | Motorola mpc5xx series of CPUs. Most of this code is taken from 7 | existing code mainly from the mpc8xx port. In contrast to mpc8xx, 8 | the mpc5xx has no CPM, MMU and cache facilities. 9 | 10 | The implemented features have been tested on the cmi board, a 11 | customer specific board (see README.cmi). 12 | 13 | Hence this port is only tested on the cmi board further possible 14 | tests on other boards will be very valuable. 15 | 16 | Not Tested Features: 17 | ==================== 18 | 19 | * System calls 20 | * Interrupts 21 | 22 | Added or Changed Files: 23 | ======================= 24 | 25 | u-boot-0.2.0/common/cmd_boot.c 26 | u-boot-0.2.0/common/cmd_reginfo.c 27 | u-boot-0.2.0/common/environment.c 28 | u-boot-0.2.0/cpu/mpc5xx/* 29 | u-boot-0.2.0/include/cmd_reginfo.h 30 | u-boot-0.2.0/include/common.h 31 | u-boot-0.2.0/include/ppc_asm.tmpl 32 | u-boot-0.2.0/include/watchdog.h 33 | u-boot-0.2.0/include/mpc5xx.h 34 | u-boot-0.2.0/include/status_led.h 35 | u-boot-0.2.0/include/asm-ppc/u-boot.h 36 | u-boot-0.2.0/include/asm-ppc/5xx_immap.h 37 | u-boot-0.2.0/lib_ppc/board.c 38 | u-boot-0.2.0/lib_ppc/cache.c 39 | u-boot-0.2.0/lib_ppc/time.c 40 | u-boot-0.2.0/Makefile 41 | u-boot-0.2.0/CREDITS 42 | u-boot-0.2.0/doc/README.mpc5xx 43 | u-boot-0.2.0/doc/README.cmi 44 | u-boot-0.2.0/README 45 | u-boot-0.2.0/MAKEALL 46 | 47 | Regards, 48 | Martin 49 | -------------------------------------------------------------------------------- /doc/README.mpc74xx: -------------------------------------------------------------------------------- 1 | This file contains status information for the port of U-Boot to the 2 | Motorola mpc74xx series of CPUs. 3 | 4 | Author: Josh Huber 5 | Mission Critical Linux, Inc. 6 | 7 | Currently the support for these CPUs is pretty minimal, but enough to 8 | get things going. (much like the support for the Galileo Eval Board) 9 | 10 | There is a framework in place to enable the L2 cache, and to program 11 | the BATs. Currently, there are still problems with the code which 12 | sets up the L2 cache, so it's not enabled. (IMHO, it shouldn't be 13 | anyway). Additionally, there is support for enabling the MMU, which 14 | we also don't do. The BATs are programmed just for the benefit of 15 | jumping into Linux in a sane configuration. 16 | 17 | Most of the code was based on other cpus supported by U-Boot. 18 | 19 | If you find any errors in the CPU setup code, please send us a note. 20 | 21 | Thanks, 22 | Josh 23 | -------------------------------------------------------------------------------- /doc/README.ne2000: -------------------------------------------------------------------------------- 1 | This driver supports NE2000 compatible cards (those based on DP8390, 2 | DP83902 and similar). It can be used with PCMCIA/CF cards provided 3 | that the CCR is correctly initialized. 4 | 5 | The code is based on sources from the Linux kernel (pcnet_cs.c, 6 | 8390.h) and eCOS(if_dp83902a.c, if_dp83902a.h). Both of these 2 7 | wonderful world are GPL, so this is, of course, GPL. 8 | 9 | I developed and tested this driver on a custom PXA255 based system and 10 | with a billionton CF network card connected to the PCMCIA interface of 11 | the micro (have a look at README.PXA_CF for the support of this port). 12 | 13 | The options you have to specify in the config file are (with the 14 | value for my board as an example): 15 | 16 | #define CONFIG_DRIVER_NE2000 17 | 18 | - Enables the driver 19 | 20 | #define CONFIG_DRIVER_NE2000_BASE (0x20000000+0x300) 21 | 22 | - Address where the board is mapped 23 | 24 | #define CONFIG_DRIVER_NE2000_CCR (0x28000000+0x3f8) 25 | 26 | - Address of the CCR (card configuration register). It could be found 27 | by enabling DEBUG in cmd_pcmcia.c. If this is not defined nothing is 28 | done as far as PCMCIA support is concerned. 29 | 30 | #define CONFIG_DRIVER_NE2000_VAL (0x20) 31 | 32 | - The value to be written in the CCR. It selects among different I/O 33 | spaces that could be used by the card. 34 | 35 | 36 | Enjoy! 37 | 38 | Christian Pellegrin 39 | -------------------------------------------------------------------------------- /doc/README.ns9750dev: -------------------------------------------------------------------------------- 1 | U-Boot Port to the NS9750 DevKit from NetSilicon 2 | 3 | 1 Overview 4 | 2 Board Configuration 5 | 3 Installation 6 | 7 | 8 | 1 Overview 9 | ---------- 10 | 11 | This port supports these NS9750 features. 12 | 13 | o one UART 14 | 15 | 2 Board Configuration 16 | --------------------- 17 | 18 | Switches: 19 | SW10: 4 20 | SW11: 6,7 21 | SW16: 6,7,8 22 | SW17-SW20: 1 23 | SW4: 3, 6 24 | SW 1: 1 25 | SW2: 4 26 | SW3: 3 27 | SW8: 3 (rotated by 180 degree!!!!) 28 | 29 | Serial Console is Port B (bottom right port) 30 | 31 | 3 Installation 32 | -------------- 33 | 34 | Have fun, 35 | -- 36 | Markus Pietrek 37 | -------------------------------------------------------------------------------- /doc/README.ocotea: -------------------------------------------------------------------------------- 1 | IBM Ocotea Board 2 | 3 | Last Update: March 2, 2004 4 | ======================================================================= 5 | 6 | This file contains some handy info regarding U-Boot and the IBM 7 | Ocotea 440gx evalutation board. See the README.ppc440 for additional 8 | information. 9 | 10 | 11 | SWITCH SETTINGS & JUMPERS 12 | ========================== 13 | 14 | Here's what I've been using successfully. If you feel inclined to 15 | change things ... please read the docs! 16 | 17 | DIPSW U46 U80 18 | ------------------------ 19 | SW 1 off off 20 | SW 2 on off 21 | SW 3 off off 22 | SW 4 off off 23 | SW 5 off off 24 | SW 6 on on 25 | SW 7 on off 26 | SW 8 on off 27 | 28 | J41: strapped 29 | J42: open 30 | 31 | All others are factory default. 32 | 33 | 34 | I2C Information 35 | ===================== 36 | 37 | See README.ebony for information. 38 | 39 | PCI 40 | =========================== 41 | 42 | Untested at the time of writing. 43 | 44 | PPC440GX Ethernet EMACs 45 | =========================== 46 | 47 | All EMAC ports have been tested and are known to work 48 | with EPS Group 4. 49 | 50 | Special note about the Cicada CIS8201: 51 | The CIS8201 Gigabit PHY comes up in GMII mode by default. 52 | One must hit an extended register to allow use of RGMII mode. 53 | This has been done in the 440gx_enet.c file with a #ifdef/endif 54 | pair. 55 | 56 | IBM does not store the EMAC ethernet addresses within their PIBS bootloader. 57 | The addresses contained in the config header file are from my particular 58 | board and you _*should*_ change them to reflect your board either in the 59 | config file and/or in your environment variables. I found the addresses on 60 | labels on the bottom side of the board. 61 | 62 | 63 | BDI2k or JTAG Debugging 64 | =========================== 65 | 66 | For ease of debugging you can swap the small boot flash and external SRAM 67 | by changing U46:3 to on. You can then use the sram as your boot flash by 68 | loading the sram via the jtag debugger. 69 | 70 | 71 | Regards, 72 | --Travis 73 | 74 | -------------------------------------------------------------------------------- /doc/README.sched: -------------------------------------------------------------------------------- 1 | Notes on the scheduler in sched.c: 2 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3 | 4 | 'sched.c' provides an very simplistic multi-threading scheduler. 5 | See the example, function 'sched(...)', in the same file for its 6 | API usage. 7 | 8 | Until an exhaustive testing can be done, the implementation cannot 9 | qualify as that of production quality. It works with the example 10 | in 'sched.c', it may or may not work in other cases. 11 | 12 | 13 | Limitations: 14 | ~~~~~~~~~~~~ 15 | 16 | - There are NO primitives for thread synchronization (locking, 17 | notify etc). 18 | 19 | - Only the GPRs and FPRs context is saved during a thread context 20 | switch. Other registers on the PowerPC processor (60x, 7xx, 7xxx 21 | etc) are NOT saved. 22 | 23 | - The scheduler is NOT transparent to the user. The user 24 | applications must invoke thread_yield() to allow other threads to 25 | scheduler. 26 | 27 | - There are NO priorities, and the scheduling policy is round-robin 28 | based. 29 | 30 | - There are NO capabilities to collect thread CPU usage, scheduler 31 | stats, thread status etc. 32 | 33 | - The semantics are somewhat based on those of pthreads, but NOT 34 | the same. 35 | 36 | - Only seven threads are allowed. These can be easily increased by 37 | changing "#define MAX_THREADS" depending on the available memory. 38 | 39 | - The stack size of each thread is 8KBytes. This can be easily 40 | increased depending on the requirement and the available memory, 41 | by increasing "#define STK_SIZE". 42 | 43 | - Only one master/parent thread is allowed, and it cannot be 44 | stopped or deleted. Any given thread is NOT allowed to stop or 45 | delete itself. 46 | 47 | - There NOT enough safety checks as are probably in the other 48 | threads implementations. 49 | 50 | - There is no parent-child relationship between threads. Only one 51 | thread may thread_join, preferably the master/parent thread. 52 | 53 | (C) 2003 Arun Dharankar 54 | -------------------------------------------------------------------------------- /doc/README.serial_multi: -------------------------------------------------------------------------------- 1 | The support for multiple serial interfaces as implemented is mainly 2 | intended to allow for modem dial-in / dial-out while still being able 3 | to use a serial console on a (different) serial port. 4 | 5 | MPC8XX Specific 6 | =============== 7 | At the moment, the ports must be split on a SMC and a SCC port on a 8 | 8xx processor; other configurations are not (yet) supported. 9 | 10 | Support for hardware handshake has not been implemented yet (but is 11 | in the works). 12 | 13 | *) The default console depends on the keys pressed: 14 | - SMC if keys not pressed (modem not enabled) 15 | - SCC if keys pressed (modem enabled) 16 | 17 | *) The console can be switched to SCC by any of the following commands: 18 | 19 | setenv stdout serial_scc 20 | setenv stdin serial_scc 21 | setenv stderr serial_scc 22 | 23 | *) The console can be switched to SMC by any of the following commands: 24 | 25 | setenv stdout serial_smc 26 | setenv stdin serial_smc 27 | setenv stderr serial_smc 28 | 29 | *) If a file descriptor is set to "serial" then the current serial device 30 | will be used which, in turn, can be switched by above commands. 31 | 32 | *) The baudrate is the same for all serial devices. But it can be switched 33 | just after switching the console: 34 | 35 | setenv sout serial_scc; setenv baudrate 38400 36 | 37 | After that press 'enter' at the SCC console. Note that baudrates <38400 38 | are not allowed on LWMON with watchdog enabled (see CFG_BAUDRATE_TABLE in 39 | include/configs/lwmon.h). 40 | 41 | 42 | PPC4XX Specific 43 | =============== 44 | *) The default console is UART0 45 | 46 | *) The console can be switched to UART1 by any of the following commands: 47 | setenv stdout serial1 48 | setenv stderr serial1 49 | setenv stdin serial1 50 | 51 | *) The console can be switched to UART0 by any of the following commands: 52 | setenv stdout serial0 53 | setenv stderr serial0 54 | setenv stdin serial0 55 | -------------------------------------------------------------------------------- /doc/README.silent: -------------------------------------------------------------------------------- 1 | The config option CONFIG_SILENT_CONSOLE can be used to quiet messages 2 | on the console. If the option has been enabled, the output can be 3 | silenced by setting the environment variable "silent". The variable 4 | is latched into the global data at an early stage in the boot process 5 | so deleting it with "setenv" will not take effect until the system is 6 | restarted. 7 | 8 | The following actions are taken if "silent" is set at boot time: 9 | 10 | - Until the console devices have been initialized, output has to be 11 | suppressed by testing for the flag "GD_FLG_SILENT" in "gd->flags". 12 | 13 | - When the console devices have been initialized, "stdout" and 14 | "stderr" are set to "nulldev", so subsequent messages are 15 | suppressed automatically. Make sure to enable "nulldev" by 16 | #defining CFG_DEVICE_NULLDEV in your board config file. 17 | 18 | - When booting a linux kernel, the "bootargs" are fixed up so that 19 | the argument "console=" will be in the command line, no matter how 20 | it was set in "bootargs" before. 21 | -------------------------------------------------------------------------------- /doc/README.video: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2000 3 | * Paolo Scaffardi, AIRVENT SAM s.p.a - RIMINI(ITALY), arsenio@tin.it 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | 24 | U-Boot MPC8xx video controller driver 25 | ====================================== 26 | 27 | The driver has been tested with the following configurations: 28 | 29 | - MPC823FADS with AD7176 on a PAL TV (YCbYCr) - arsenio@tin.it 30 | - GENIETV with AD7177 on a PAL TV (YCbYCr) - arsenio@tin.it 31 | -------------------------------------------------------------------------------- /doc/TODO-i386: -------------------------------------------------------------------------------- 1 | i386 port missing features: 2 | * i386 cleaness (wbinvld is 486+ ... ) 3 | * Pentium TSC timer/udelay 4 | * setup the BIOS data area and BIOS equipment word to reflect machine config. 5 | * Make reset work (from Linux and from the boot prompt) 6 | * DMA, FDC, RTC, KBC initialization 7 | * split of part of cpu/i386/interrupt.c to cpu/i385/entry.c? 8 | * re-entry of protected mode from real mode, should be added to realmode_switch.S 9 | (and used by INT 10h and INT 16h handlers for console I/O during early 10 | linux boot...) 11 | * missing functions in lib_i386 and cpu/i386 12 | * speaker beep interface 13 | 14 | 15 | SC520 missing features: 16 | * Watchdog 17 | * SC520 timer/udelay 18 | * SC520 3rd PIC 19 | * SC520 ICE serial 20 | * SC520 MMCR reset 21 | 22 | SC520 CDP board support missing features: 23 | * environment in sram 24 | 25 | SC520 CDP board support bugs: 26 | * SPI EEPROM support does not work 27 | * 0x680 LEDS dos not work for me 28 | * is it possible to make both the internal serial ports and the 29 | ports on the sio work at the same time? 30 | -------------------------------------------------------------------------------- /drivers/ehci-core.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2007-2008, Juniper Networks, Inc. 3 | * Copyright (c) 2008, Excito Elektronik i Skåne AB 4 | * All rights reserved. 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License as 8 | * published by the Free Software Foundation version 2 of 9 | * the License. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 19 | * MA 02111-1307 USA 20 | */ 21 | 22 | #ifndef USB_EHCI_CORE_H 23 | #define USB_EHCI_CORE_H 24 | 25 | extern int rootdev; 26 | extern struct ehci_hccr *hccr; 27 | extern volatile struct ehci_hcor *hcor; 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /drivers/nand/nand_device_list.h: -------------------------------------------------------------------------------- 1 | #ifndef __NAND_DEVICE_LIST_H__ 2 | #define __NAND_DEVICE_LIST_H__ 3 | 4 | static const flashdev_info gen_FlashTable[]={ 5 | {0x01F1, 0x801D01, 4, 8, 128, 128, 2048, 64, 0x30C77fff, "S34ML01G100TF", 0}, 6 | {0x92F1, 0x8095FF, 4, 8, 128, 128, 2048, 64, 0x30C77fff, "F59L1G81A", 0}, 7 | {0xC8DA, 0x909544, 5, 8, 256, 128, 2048, 64, 0x30C77fff, "F59L2G81A", 0}, 8 | {0xC8DC, 0x909554, 5, 8, 512, 128, 2048, 64, 0x30C77fff, "F59L4G81A", 0}, 9 | {0xECD3, 0x519558, 5, 8, 1024, 128, 2048, 64, 0x44333, "K9K8G8000", 0}, 10 | {0xC2F1, 0x801DC2, 4, 8, 128, 128, 2048, 64, 0x30C77fff, "MX30LF1G08AA", 0}, 11 | {0x2C48, 0x0026A9, 5, 8, 2048, 512, 4096, 224, 0x30C77fff, "MT29F16G08ABABA", 0}, 12 | {0x98D3, 0x902676, 5, 8, 1024, 256, 4096, 224, 0x00C25332, "TC58NVG3S0F", 0}, 13 | {0x01DA, 0x909546, 5, 8, 256, 128, 2048, 112, 0x30C77fff, "S34ML02G200TF", 0}, 14 | {0x01DC, 0x909556, 5, 8, 512, 128, 2048, 112, 0x30C77fff, "S34ML04G200TF", 0}, 15 | {0x0000, 0x000000, 0, 0, 0, 0, 0, 0, 0, "xxxxxxxxxx", 0}, 16 | }; 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /drivers/phy_val.h: -------------------------------------------------------------------------------- 1 | #ifndef USB_PHY_VAL_H 2 | #define USB_PHY_VAL_H 3 | 4 | struct _lp0r28 5 | { 6 | unsigned short final_link:1; 7 | unsigned short final_speed:1; 8 | unsigned short final_duplex:1; 9 | unsigned short tx_amp_save:2; 10 | unsigned short mdix_status:1; 11 | unsigned short mr_autoneg_complete:1; 12 | unsigned short reserved:1; 13 | unsigned short polarity_neg_pcs:1; 14 | unsigned short lch_descr_lock:1; 15 | unsigned short lch_linkup_mdix:1; 16 | unsigned short lch_linkup_mdi:1; 17 | unsigned short lch_linkup_10:1; 18 | unsigned short lch_linkup_100:1; 19 | unsigned short lch_rx_linkpulse:1; 20 | unsigned short lch_sig_detect:1; 21 | }; 22 | 23 | #define ProbeZfgain 0 24 | #define ProbeAgccode 1 25 | #define ProbeBoosten 2 26 | #define ProbeSnr 3 27 | #define ProbeDcoff 4 28 | #define ProbeAdcoff 5 29 | #define ProbeAdcSign 6 30 | 31 | unsigned int tcPhyReadReg(unsigned char port_num,unsigned char reg_num); 32 | unsigned int tcPhyReadLReg(unsigned char port_num,unsigned char page_num,unsigned char reg_num); 33 | void tcPhyWriteLReg(unsigned char port_num,unsigned char page_num,unsigned char reg_num,unsigned int reg_data); 34 | unsigned int tcPhyReadGReg(unsigned char port_num,unsigned char page_num,unsigned char reg_num); 35 | void tcPhyWriteGReg(unsigned char port_num,unsigned char page_num,unsigned char reg_num,unsigned int reg_data); 36 | int tc2105mlReadAdcSum(unsigned char port_num); 37 | int tc2105mlReadProbe(unsigned char port_num, unsigned char mode); 38 | void tc2105mlDispProbe100(unsigned char port_num); 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /drivers/usb/host/mtk-phy-ahb.c: -------------------------------------------------------------------------------- 1 | #include "mtk-phy.h" 2 | 3 | #ifdef CONFIG_U3_PHY_AHB_SUPPORT 4 | 5 | #define os_writel(addr,data) {\ 6 | (*((volatile PHY_UINT32*)(addr)) = data);\ 7 | } 8 | #define os_readl(addr) *((volatile PHY_UINT32*)(addr)) 9 | #define os_writelmsk(addr, data, msk) \ 10 | { os_writel(addr, ((os_readl(addr) & ~(msk)) | ((data) & (msk)))); \ 11 | } 12 | #define os_setmsk(addr, msk) \ 13 | { os_writel(addr, os_readl(addr) | msk); \ 14 | } 15 | #define os_clrmsk(addr, msk) \ 16 | { os_writel(addr, os_readl(addr) &~ msk); \ 17 | } 18 | /*msk the data first, then umsk with the umsk.*/ 19 | #define os_writelmskumsk(addr, data, msk, umsk) \ 20 | {\ 21 | os_writel(addr, ((os_readl(addr) & ~(msk)) | ((data) & (msk))) & (umsk));\ 22 | } 23 | 24 | 25 | PHY_INT32 U3PhyWriteReg32(PHY_UINT32 addr, PHY_UINT32 data) 26 | { 27 | os_writel(addr, data); 28 | 29 | return 0; 30 | } 31 | 32 | PHY_INT32 U3PhyReadReg32(PHY_UINT32 addr) 33 | { 34 | return os_readl(addr); 35 | } 36 | 37 | PHY_INT32 U3PhyWriteReg8(PHY_UINT32 addr, PHY_UINT8 data) 38 | { 39 | os_writelmsk(addr&0xfffffffc, data<<((addr%4)*8), 0xff<<((addr%4)*8)); 40 | 41 | return 0; 42 | } 43 | 44 | PHY_INT8 U3PhyReadReg8(PHY_UINT32 addr) 45 | { 46 | return ((os_readl(addr)>>((addr%4)*8))&0xff); 47 | } 48 | 49 | #endif 50 | 51 | -------------------------------------------------------------------------------- /drivers/usb/host/xhci-mtk-power.h: -------------------------------------------------------------------------------- 1 | #ifndef _XHCI_MTK_POWER_H 2 | #define _XHCI_MTK_POWER_H 3 | 4 | //#include 5 | #include "xhci.h" 6 | #include "xhci-mtk.h" 7 | 8 | void enableXhciAllPortPower(struct xhci_hcor *hcor); 9 | //void enableXhciAllPortPower(struct xhci_hcd *xhci); 10 | void enableAllClockPower(void); 11 | void disablePortClockPower(void); 12 | void enablePortClockPower(int port_index, int port_rev); 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /drivers/usb/host/xhci-mtk-scheduler.h: -------------------------------------------------------------------------------- 1 | #ifndef _XHCI_MTK_SCHEDULER_H 2 | #define _XHCI_MTK_SCHEDULER_H 3 | 4 | #define MTK_SCH_NEW 1 5 | 6 | #define SCH_SUCCESS 1 7 | #define SCH_FAIL 0 8 | 9 | #define MAX_EP_NUM 64 10 | #define SS_BW_BOUND 51000 11 | #define HS_BW_BOUND 6144 12 | 13 | #define USB_EP_CONTROL 0 14 | #define USB_EP_ISOC 1 15 | #define USB_EP_BULK 2 16 | #define USB_EP_INT 3 17 | 18 | #if 0 19 | #define USB_SPEED_LOW 1 20 | #define USB_SPEED_FULL 2 21 | #define USB_SPEED_HIGH 3 22 | #define USB_SPEED_SUPER 5 23 | #endif 24 | 25 | /* mtk scheduler bitmasks */ 26 | #define BPKTS(p) ((p) & 0x3f) 27 | #define BCSCOUNT(p) (((p) & 0x7) << 8) 28 | #define BBM(p) ((p) << 11) 29 | #define BOFFSET(p) ((p) & 0x3fff) 30 | #define BREPEAT(p) (((p) & 0x7fff) << 16) 31 | 32 | 33 | #if 1 34 | typedef unsigned int mtk_u32; 35 | typedef unsigned long long mtk_u64; 36 | #endif 37 | 38 | #define NULL ((void *)0) 39 | 40 | struct mtk_xhci_ep_ctx { 41 | mtk_u32 ep_info; 42 | mtk_u32 ep_info2; 43 | mtk_u64 deq; 44 | mtk_u32 tx_info; 45 | /* offset 0x14 - 0x1f reserved for HC internal use */ 46 | mtk_u32 reserved[3]; 47 | }; 48 | 49 | 50 | struct sch_ep 51 | { 52 | //device info 53 | int dev_speed; 54 | int isTT; 55 | //ep info 56 | int is_in; 57 | int ep_type; 58 | int maxp; 59 | int interval; 60 | int burst; 61 | int mult; 62 | //scheduling info 63 | int offset; 64 | int repeat; 65 | int pkts; 66 | int cs_count; 67 | int burst_mode; 68 | //other 69 | int bw_cost; //bandwidth cost in each repeat; including overhead 70 | mtk_u32 *ep; //address of usb_endpoint pointer 71 | }; 72 | 73 | int mtk_xhci_scheduler_init(void); 74 | int mtk_xhci_scheduler_add_ep(int dev_speed, int is_in, int isTT, int ep_type, int maxp, int interval, int burst 75 | , int mult, mtk_u32 *ep, mtk_u32 *ep_ctx, struct sch_ep *sch_ep); 76 | struct sch_ep * mtk_xhci_scheduler_remove_ep(int dev_speed, int is_in, int isTT, int ep_type, mtk_u32 *ep); 77 | 78 | 79 | #endif 80 | -------------------------------------------------------------------------------- /drivers/usb/host/xhci-mtk.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "xhci-mtk.h" 4 | #include "xhci.h" 5 | #include "mtk-phy.h" 6 | 7 | /* Declare global data pointer */ 8 | DECLARE_GLOBAL_DATA_PTR; 9 | 10 | /** 11 | * Contains pointers to register base addresses 12 | * for the usb controller. 13 | */ 14 | 15 | void reinitIP(void) 16 | { 17 | enableAllClockPower(); 18 | mtk_xhci_scheduler_init(); 19 | } 20 | 21 | int xhci_hcd_init(int index, struct xhci_hccr **hccr, struct xhci_hcor **hcor) 22 | { 23 | u3phy_init(); 24 | u2_slew_rate_calibration(u3phy); 25 | u2_slew_rate_calibration(u3phy_p1); 26 | 27 | mt7621_phy_init(u3phy); 28 | 29 | reinitIP(); 30 | 31 | *hccr = (uint32_t)XHC_IO_START; 32 | *hcor = (struct xhci_hcor *)((uint32_t) *hccr 33 | + HC_LENGTH(xhci_readl(&(*hccr)->cr_capbase))); 34 | 35 | debug("mtk-xhci: init hccr %x and hcor %x hc_length %d\n", 36 | (uint32_t)*hccr, (uint32_t)*hcor, 37 | (uint32_t)HC_LENGTH(xhci_readl(&(*hccr)->cr_capbase))); 38 | 39 | return 0; 40 | } 41 | 42 | void xhci_hcd_stop(int index) 43 | { 44 | disablePortClockPower(); 45 | } 46 | -------------------------------------------------------------------------------- /fs/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # (C) Copyright 2000, 2001 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | # 5 | # See file CREDITS for list of people who contributed to this 6 | # project. 7 | # 8 | # This program is free software; you can redistribute it and/or 9 | # modify it under the terms of the GNU General Public License as 10 | # published by the Free Software Foundation; either version 2 of 11 | # the License, or (at your option) any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program; if not, write to the Free Software 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | # MA 02111-1307 USA 22 | # 23 | # 24 | 25 | SUBDIRS := jffs2 cramfs fdos fat reiserfs ext2 26 | 27 | .depend all: 28 | @for dir in $(SUBDIRS) ; do \ 29 | $(MAKE) -C $$dir $@ ; done 30 | -------------------------------------------------------------------------------- /fs/fat/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | # See file CREDITS for list of people who contributed to this 4 | # project. 5 | # 6 | # This program is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU General Public License as 8 | # published by the Free Software Foundation; either version 2 of 9 | # the License, or (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; if not, write to the Free Software 18 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, 19 | # MA 02111-1307 USA 20 | # 21 | 22 | TOPDIR=../../ 23 | 24 | include $(TOPDIR)/config.mk 25 | 26 | LIB = libfat.a 27 | 28 | AOBJS = 29 | COBJS = fat.o file.o 30 | 31 | OBJS = $(AOBJS) $(COBJS) 32 | 33 | all: $(LIB) $(AOBJS) 34 | 35 | $(LIB): .depend $(OBJS) 36 | $(AR) crv $@ $(OBJS) 37 | 38 | 39 | ######################################################################### 40 | 41 | .depend: Makefile $(AOBJS:.o=.S) $(COBJS:.o=.c) 42 | $(CC) -M $(CFLAGS) $(AOBJS:.o=.S) $(COBJS:.o=.c) > $@ 43 | 44 | sinclude .depend 45 | 46 | ######################################################################### 47 | -------------------------------------------------------------------------------- /httpd/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for http stuff 3 | # 4 | 5 | include $(TOPDIR)/config.mk 6 | 7 | LIB = libhttpd.a 8 | OBJS += uip.o uip_arch.o uip_arp.o httpd.o fs.o 9 | 10 | all: $(LIB) 11 | 12 | fs.c: fsdata.c 13 | 14 | fsdata.c: 15 | ./vendors/makefsdatac $(DEVICE_VENDOR) 16 | 17 | $(LIB): $(START) $(OBJS) 18 | $(AR) crv $@ $(OBJS) 19 | 20 | ######################################################################### 21 | 22 | .depend: Makefile $(OBJS:.o=.c) 23 | $(CC) -M $(CFLAGS) $(OBJS:.o=.c) > $@ 24 | 25 | sinclude .depend 26 | 27 | ######################################################################### 28 | 29 | -------------------------------------------------------------------------------- /httpd/tapdev.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001, Adam Dunkels. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote 14 | * products derived from this software without specific prior 15 | * written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 18 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 21 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 23 | * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | * This file is part of the uIP TCP/IP stack. 30 | * 31 | * $Id: tapdev.h,v 1.1.2.1 2003/10/04 22:54:17 adam Exp $ 32 | * 33 | */ 34 | 35 | #ifndef __TAPDEV_H__ 36 | #define __TAPDEV_H__ 37 | 38 | void tapdev_init(void); 39 | unsigned int tapdev_read(void); 40 | void tapdev_send(void); 41 | 42 | #endif /* __TAPDEV_H__ */ 43 | -------------------------------------------------------------------------------- /httpd/vendors/dragino/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Page not found 6 | 7 | 8 | 9 | 10 |
11 |
12 |

Page not found

13 |

The page you were looking for doesn't exist!
Go back to firmware update page.

14 |
15 |
You can find more information about this project on GitHub
16 | 17 | -------------------------------------------------------------------------------- /httpd/vendors/dragino/f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinney/MT7621-u-boot-mod/f546d5f423b00be6422703ef794b0526c9b74a4d/httpd/vendors/dragino/f.png -------------------------------------------------------------------------------- /httpd/vendors/dragino/fail.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Update failed 6 | 7 | 8 | 9 | 10 |
11 |
12 |

Update failed

13 |

Please, try again or contact with the author of this modification.
You can also get more information during update in U-Boot console.

14 |
15 |
You can find more information about this project on GitHub
16 | 17 | -------------------------------------------------------------------------------- /httpd/vendors/dragino/flashing.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Update in progress 6 | 9 | 10 | 11 |
12 |

Update in progress

13 |

Your file was successfully uploaded! Update is in progress and you should wait for automatic reset of the device.
Update time depends on image size and may take up to a few minutes. You can close this page.

14 |
15 |
16 |
You can find more information about this project on GitHub
17 | 18 | -------------------------------------------------------------------------------- /httpd/vendors/dragino/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Firmware update 6 | 7 | 8 | 9 | 10 |
11 |
12 |

Firmware update

13 |

You are going to upload new firmware to the device.
Choose a proper file from your local hard drive and click "Update firmware" button.
Please, do not power off the device during update, if everything goes well, the device will restart.

14 |
15 |
16 |
You can find more information about this project on GitHub
17 | 18 | -------------------------------------------------------------------------------- /httpd/vendors/dragino/l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinney/MT7621-u-boot-mod/f546d5f423b00be6422703ef794b0526c9b74a4d/httpd/vendors/dragino/l.png -------------------------------------------------------------------------------- /httpd/vendors/dragino/style.css: -------------------------------------------------------------------------------- 1 | h1, 2 | p, 3 | form, 4 | body { 5 | margin: 0; 6 | padding: 0; 7 | } 8 | 9 | html, 10 | body { 11 | font: 13px/20px Tahoma, sans-serif; 12 | background: #135B72; 13 | color: #FFF; 14 | text-align: center; 15 | height: 100%; 16 | } 17 | 18 | #m, #h { 19 | padding: 30px 0; 20 | } 21 | 22 | #h { 23 | background: #FFF; 24 | } 25 | 26 | #m > * { 27 | padding: 20px; 28 | } 29 | 30 | #f { 31 | font-size: 11px; 32 | position: absolute; 33 | bottom: 0; 34 | width: 100%; 35 | padding: 15px 0; 36 | } 37 | 38 | a { 39 | color: #FEDD12; 40 | text-decoration: none; 41 | } 42 | 43 | h1 { 44 | font: bold 40px/40px Arial; 45 | } 46 | 47 | .red { 48 | color: #ED0000; 49 | } -------------------------------------------------------------------------------- /httpd/vendors/general/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Page not found 6 | 7 | 8 | 9 |
10 |

PAGE NOT FOUND

11 |
The page you were looking for doesn't exist!
12 |
13 |
You can find more information about this project on GitHub
14 | 15 | -------------------------------------------------------------------------------- /httpd/vendors/general/art.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ART update 6 | 7 | 8 | 9 |
10 |

ART UPDATE

11 |

You are going to update ART (Atheros Radio Test) on the device.
Please, choose file from your local hard drive and click Update ART button.

12 |
13 |
14 | WARNINGS 15 |
    16 |
  • do not power off the device during update
  • 17 |
  • if everything goes well, the device will restart
  • 18 |
  • you can upload whatever you want, so be sure that you choose proper ART image for your device
  • 19 |
20 |
21 |
22 |
You can find more information about this project on GitHub
23 | 24 | -------------------------------------------------------------------------------- /httpd/vendors/general/fail.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Update failed 6 | 7 | 8 | 9 |
10 |

UPDATE FAILED

11 |
Something went wrong during updateProbably you have chosen wrong file (too big or too small) or you were trying to update ART on device with unknown FLASH type (and size) which is not allowed. Please, try again or contact with the author of this modification. You can also get more information during update in U-Boot console.
12 |
13 |
You can find more information about this project on GitHub
14 | 15 | -------------------------------------------------------------------------------- /httpd/vendors/general/flashing.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Update in progress 6 | 8 | 9 | 10 |
11 |

UPDATE IN PROGRESS

12 |

Your file was successfully uploaded! Update is in progress and you should wait for automatic reset of the device.
Update time depends on image size and may take up to a few minutes. You can close this page.

13 |
14 |
15 |
You can find more information about this project on GitHub
16 | 17 | -------------------------------------------------------------------------------- /httpd/vendors/general/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Firmware update 6 | 7 | 8 | 9 |
10 |

FIRMWARE UPDATE

11 |

You are going to update firmware on the device.
Please, choose file from your local hard drive and click Update firmware button.

12 |
13 |
14 | WARNINGS 15 |
    16 |
  • do not power off the device during update
  • 17 |
  • if everything goes well, the device will restart
  • 18 |
  • you can upload whatever you want, so be sure that you choose proper firmware image for your device
  • 19 |
20 |
21 |
22 |
You can find more information about this project on GitHub
23 | 24 | -------------------------------------------------------------------------------- /httpd/vendors/general/style.css: -------------------------------------------------------------------------------- 1 | h1, 2 | p, 3 | form, 4 | ul { 5 | margin: 0; 6 | padding: 0; 7 | } 8 | 9 | html, 10 | body { 11 | font: 13px/20px Arial, sans-serif; 12 | background: #EDEDED; 13 | } 14 | 15 | #m { 16 | max-width: 750px; 17 | margin: 30px auto 10px; 18 | border: solid 1px #BABABA; 19 | background: #FFF; 20 | border-radius: 7px; 21 | box-shadow: 0 0 10px #D2D1D1; 22 | } 23 | 24 | #m > * { 25 | padding: 20px; 26 | } 27 | 28 | h1 { 29 | font: bold 50px/50px Tahoma; 30 | border-bottom: solid 1px #E8E8E8; 31 | } 32 | 33 | a, 34 | h1 { 35 | color: #2450AD; 36 | text-decoration: none; 37 | } 38 | 39 | .i { 40 | margin: 20px; 41 | border-radius: 7px; 42 | text-align: justify; 43 | } 44 | 45 | .w { 46 | background: #FEFDCE; 47 | border: solid 1px #FFC643; 48 | } 49 | 50 | .e { 51 | background: #FFE7E7; 52 | border:solid 1px #FE7171; 53 | } 54 | 55 | #f { 56 | text-align: center; 57 | color: #969393; 58 | } 59 | 60 | form, 61 | p, 62 | h1 { 63 | text-align: center; 64 | } 65 | 66 | ul { 67 | list-style: square; 68 | margin: 0 0 0 20px; 69 | } 70 | 71 | .red { 72 | color: #E41616; 73 | } 74 | 75 | .i strong { 76 | margin: 0 0 5px; 77 | display: block; 78 | } -------------------------------------------------------------------------------- /httpd/vendors/general/uboot.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | U-Boot update 6 | 7 | 8 | 9 |
10 |

U-BOOT UPDATE

11 |

You are going to update U-Boot bootloader on the device.
Please, choose file from your local hard drive and click Update U-Boot button.

12 |
13 |
14 | WARNINGS 15 |
    16 |
  • do not power off the device during update
  • 17 |
  • if everything goes well, the device will restart
  • 18 |
  • you can upload whatever you want, so be sure that you choose proper U-Boot image for your device
  • 19 |
  • updating U-Boot is a very dangerous operation and may damage your device!
  • 20 |
21 |
22 |
23 |
You can find more information about this project on GitHub
24 | 25 | -------------------------------------------------------------------------------- /httpd/vendors/oem/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Page not found 6 | 7 | 8 | 9 |
10 |

Page not found

11 |

The page you were looking for doesn't exist!
Go back to firmware update page.

12 |
13 | 14 | -------------------------------------------------------------------------------- /httpd/vendors/oem/fail.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Update failed 6 | 7 | 8 | 9 |
10 |

Update failed

11 |

Please, try again or contact with the support.
You can also get more information during update in U-Boot console.

12 |
13 | 14 | -------------------------------------------------------------------------------- /httpd/vendors/oem/flashing.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Update in progress 6 | 9 | 10 | 11 |
12 |

Update in progress

13 |

Your file was successfully uploaded! Update is in progress and you should wait for automatic reset of the device.
Update time depends on image size and may take up to a few minutes. You can close this page.

14 |
15 |
16 | 17 | -------------------------------------------------------------------------------- /httpd/vendors/oem/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Firmware update 6 | 7 | 8 | 9 |
10 |

Firmware update

11 |

You are going to upload new firmware to the device.
Choose a proper file from your local hard drive and click "Update firmware" button.
Please, do not power off the device during update, if everything goes well, the device will restart.

12 |
13 |
14 | 15 | -------------------------------------------------------------------------------- /httpd/vendors/oem/style.css: -------------------------------------------------------------------------------- 1 | h1, 2 | p, 3 | form, 4 | body { 5 | margin: 0; 6 | padding: 0; 7 | } 8 | 9 | html, 10 | body { 11 | font: 13px/20px Tahoma, sans-serif; 12 | background: #FFF; 13 | color: #000; 14 | text-align: center; 15 | height: 100%; 16 | } 17 | 18 | #m { 19 | padding: 30px 0; 20 | } 21 | 22 | #m > * { 23 | padding: 20px; 24 | } 25 | 26 | a { 27 | color: #0069FB; 28 | text-decoration: none; 29 | } 30 | 31 | h1 { 32 | font: bold 40px/40px Arial; 33 | } 34 | 35 | .red { 36 | color: #ED0000; 37 | } -------------------------------------------------------------------------------- /httpd/vendors/villagetelco/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Page not found 6 | 7 | 8 | 9 | 10 |
11 |
12 |

Page not found

13 |

The page you were looking for doesn't exist!
Go back to firmware update page.

14 |
15 |
You can find more information about this project on GitHub
16 | 17 | -------------------------------------------------------------------------------- /httpd/vendors/villagetelco/fail.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Update failed 6 | 7 | 8 | 9 | 10 |
11 |
12 |

Update failed

13 |

Please, try again or contact with the author of this modification.
You can also get more information during update in U-Boot console.

14 |
15 |
You can find more information about this project on GitHub
16 | 17 | -------------------------------------------------------------------------------- /httpd/vendors/villagetelco/flashing.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Update in progress 6 | 9 | 10 | 11 |
12 |

Update in progress

13 |

Your file was successfully uploaded! Update is in progress and you should wait for automatic reset of the device.
Update time depends on image size and may take up to a few minutes. You can close this page.

14 |
15 |
16 |
You can find more information about this project on GitHub
17 | 18 | -------------------------------------------------------------------------------- /httpd/vendors/villagetelco/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Firmware update 6 | 7 | 8 | 9 | 10 |
11 |
12 |

Firmware update

13 |

You are going to upload new firmware to the device.
Choose a proper file from your local hard drive and click "Update firmware" button.
Please, do not power off the device during update, if everything goes well, the device will restart.

14 |
15 |

For more technical information, please consult
the Village Telco wiki or join the Village Telco development community. 16 |

17 |
You can find more information about this project on GitHub
18 | 19 | -------------------------------------------------------------------------------- /httpd/vendors/villagetelco/style.css: -------------------------------------------------------------------------------- 1 | h1, 2 | p, 3 | form, 4 | body { 5 | margin: 0; 6 | padding: 0; 7 | } 8 | 9 | html, 10 | body { 11 | font: 13px/20px Tahoma, sans-serif; 12 | background: #5a4a42; 13 | color: #FFF; 14 | text-align: center; 15 | height: 100%; 16 | } 17 | 18 | #m, #h { 19 | padding: 30px 0; 20 | } 21 | 22 | #h { 23 | background: #FFF; 24 | } 25 | 26 | #m > * { 27 | padding: 20px; 28 | } 29 | 30 | #f { 31 | font-size: 11px; 32 | position: absolute; 33 | bottom: 0; 34 | width: 100%; 35 | padding: 15px 0; 36 | } 37 | 38 | a { 39 | color: #FEDD12; 40 | text-decoration: none; 41 | } 42 | 43 | h1 { 44 | font: bold 40px/40px Arial; 45 | } 46 | 47 | .red { 48 | color: #ED0000; 49 | } -------------------------------------------------------------------------------- /httpd/vendors/villagetelco/v.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinney/MT7621-u-boot-mod/f546d5f423b00be6422703ef794b0526c9b74a4d/httpd/vendors/villagetelco/v.png -------------------------------------------------------------------------------- /httpd/vendors/villagetelco/vt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinney/MT7621-u-boot-mod/f546d5f423b00be6422703ef794b0526c9b74a4d/httpd/vendors/villagetelco/vt.png -------------------------------------------------------------------------------- /httpd/vendors/yuicompressor-2.4.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinney/MT7621-u-boot-mod/f546d5f423b00be6422703ef794b0526c9b74a4d/httpd/vendors/yuicompressor-2.4.8.jar -------------------------------------------------------------------------------- /include/_exports.h: -------------------------------------------------------------------------------- 1 | EXPORT_FUNC(get_version) 2 | EXPORT_FUNC(getc) 3 | EXPORT_FUNC(tstc) 4 | EXPORT_FUNC(putc) 5 | EXPORT_FUNC(puts) 6 | EXPORT_FUNC(printf) 7 | EXPORT_FUNC(install_hdlr) 8 | EXPORT_FUNC(free_hdlr) 9 | EXPORT_FUNC(malloc) 10 | EXPORT_FUNC(free) 11 | EXPORT_FUNC(udelay) 12 | EXPORT_FUNC(get_timer) 13 | EXPORT_FUNC(vprintf) 14 | EXPORT_FUNC(do_reset) 15 | -------------------------------------------------------------------------------- /include/asm-mips/byteorder.h: -------------------------------------------------------------------------------- 1 | /* $Id: //WIFI_SOC/MP/SDK_4_3_0_0/Uboot/include/asm-mips/byteorder.h#1 $ 2 | * 3 | * This file is subject to the terms and conditions of the GNU General Public 4 | * License. See the file "COPYING" in the main directory of this archive 5 | * for more details. 6 | * 7 | * Copyright (C) by Ralf Baechle 8 | */ 9 | #ifndef _MIPS_BYTEORDER_H 10 | #define _MIPS_BYTEORDER_H 11 | 12 | #include 13 | 14 | #ifdef __GNUC__ 15 | 16 | #if !defined(__STRICT_ANSI__) || defined(__KERNEL__) 17 | # define __BYTEORDER_HAS_U64__ 18 | # define __SWAB_64_THRU_32__ 19 | #endif 20 | 21 | #endif /* __GNUC__ */ 22 | 23 | #if defined (__MIPSEB__) 24 | # include 25 | #elif defined (__MIPSEL__) 26 | # include 27 | #else 28 | # error "MIPS, but neither __MIPSEB__, nor __MIPSEL__???" 29 | #endif 30 | 31 | #endif /* _MIPS_BYTEORDER_H */ 32 | -------------------------------------------------------------------------------- /include/asm-mips/cachectl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * cachectl.h -- defines for MIPS cache control system calls 3 | * 4 | * Copyright (C) 1994, 1995, 1996 by Ralf Baechle 5 | */ 6 | #ifndef __ASM_MIPS_CACHECTL 7 | #define __ASM_MIPS_CACHECTL 8 | 9 | /* 10 | * Options for cacheflush system call 11 | */ 12 | #define ICACHE (1<<0) /* flush instruction cache */ 13 | #define DCACHE (1<<1) /* writeback and flush data cache */ 14 | #define BCACHE (ICACHE|DCACHE) /* flush both caches */ 15 | 16 | /* 17 | * Caching modes for the cachectl(2) call 18 | * 19 | * cachectl(2) is currently not supported and returns ENOSYS. 20 | */ 21 | #define CACHEABLE 0 /* make pages cacheable */ 22 | #define UNCACHEABLE 1 /* make pages uncacheable */ 23 | 24 | #endif /* __ASM_MIPS_CACHECTL */ 25 | -------------------------------------------------------------------------------- /include/asm-mips/cacheops.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Cache operations for the cache instruction. 3 | * 4 | * This file is subject to the terms and conditions of the GNU General Public 5 | * License. See the file "COPYING" in the main directory of this archive 6 | * for more details. 7 | * 8 | * (C) Copyright 1996, 1997 by Ralf Baechle 9 | */ 10 | #ifndef __ASM_MIPS_CACHEOPS_H 11 | #define __ASM_MIPS_CACHEOPS_H 12 | 13 | /* 14 | * Cache Operations 15 | */ 16 | #define Index_Invalidate_I 0x00 17 | #define Index_Writeback_Inv_D 0x01 18 | #define Index_Invalidate_SI 0x02 19 | #define Index_Writeback_Inv_SD 0x03 20 | #define Index_Load_Tag_I 0x04 21 | #define Index_Load_Tag_D 0x05 22 | #define Index_Load_Tag_SI 0x06 23 | #define Index_Load_Tag_SD 0x07 24 | #define Index_Store_Tag_I 0x08 25 | #define Index_Store_Tag_D 0x09 26 | #define Index_Store_Tag_SI 0x0A 27 | #define Index_Store_Tag_SD 0x0B 28 | #define Create_Dirty_Excl_D 0x0d 29 | #define Create_Dirty_Excl_SD 0x0f 30 | #define Hit_Invalidate_I 0x10 31 | #define Hit_Invalidate_D 0x11 32 | #define Hit_Invalidate_SI 0x12 33 | #define Hit_Invalidate_SD 0x13 34 | #define Fill 0x14 35 | #define Hit_Writeback_Inv_D 0x15 36 | /* 0x16 is unused */ 37 | #define Hit_Writeback_Inv_SD 0x17 38 | #define Hit_Writeback_I 0x18 39 | #define Hit_Writeback_D 0x19 40 | /* 0x1a is unused */ 41 | #define Hit_Writeback_SD 0x1b 42 | /* 0x1c is unused */ 43 | /* 0x1e is unused */ 44 | #define Hit_Set_Virtual_SI 0x1e 45 | #define Hit_Set_Virtual_SD 0x1f 46 | 47 | /* 48 | * Cache Operations available on all MIPS processors with R4000-style caches 49 | */ 50 | #define INDEX_INVALIDATE_I 0x00 51 | #define INDEX_WRITEBACK_INV_D 0x01 52 | #define INDEX_LOAD_TAG_I 0x04 53 | #define INDEX_LOAD_TAG_D 0x05 54 | #define INDEX_STORE_TAG_I 0x08 55 | #define INDEX_STORE_TAG_D 0x09 56 | #if defined(CONFIG_CPU_LOONGSON2) 57 | #define HIT_INVALIDATE_I 0x00 58 | #else 59 | #define HIT_INVALIDATE_I 0x10 60 | #endif 61 | #define HIT_INVALIDATE_D 0x11 62 | #define HIT_WRITEBACK_INV_D 0x15 63 | 64 | /* 65 | * R4000-specific cacheops 66 | */ 67 | #define CREATE_DIRTY_EXCL_D 0x0d 68 | #define FILL 0x14 69 | #define HIT_WRITEBACK_I 0x18 70 | #define HIT_WRITEBACK_D 0x19 71 | 72 | #endif /* __ASM_MIPS_CACHEOPS_H */ 73 | -------------------------------------------------------------------------------- /include/asm-mips/global_data.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2002-2003 3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | 24 | #ifndef __ASM_GBL_DATA_H 25 | #define __ASM_GBL_DATA_H 26 | 27 | #include 28 | 29 | /* 30 | * The following data structure is placed in some memory wich is 31 | * available very early after boot (like DPRAM on MPC8xx/MPC82xx, or 32 | * some locked parts of the data cache) to allow for a minimum set of 33 | * global variables during system initialization (until we have set 34 | * up the memory controller so that we can use RAM). 35 | * 36 | * Keep it *SMALL* and remember to set CFG_GBL_DATA_SIZE > sizeof(gd_t) 37 | */ 38 | 39 | typedef struct global_data { 40 | bd_t *bd; 41 | unsigned long flags; 42 | unsigned long baudrate; 43 | unsigned long have_console; /* serial_init() was called */ 44 | unsigned long ram_size; /* RAM size */ 45 | unsigned long reloc_off; /* Relocation Offset */ 46 | unsigned long env_addr; /* Address of Environment struct */ 47 | unsigned long env_valid; /* Checksum of Environment valid? */ 48 | void **jt; /* jump table */ 49 | } gd_t; 50 | 51 | /* 52 | * Global Data Flags 53 | */ 54 | #define GD_FLG_RELOC 0x00001 /* Code was relocated to RAM */ 55 | #define GD_FLG_DEVINIT 0x00002 /* Devices have been initialized */ 56 | #define GD_FLG_SILENT 0x00004 /* Silent mode */ 57 | 58 | #define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("k0") 59 | 60 | #endif /* __ASM_GBL_DATA_H */ 61 | -------------------------------------------------------------------------------- /include/asm-mips/inca-ip.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinney/MT7621-u-boot-mod/f546d5f423b00be6422703ef794b0526c9b74a4d/include/asm-mips/inca-ip.h -------------------------------------------------------------------------------- /include/asm-mips/isadep.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Various ISA level dependant constants. 3 | * Most of the following constants reflect the different layout 4 | * of Coprocessor 0 registers. 5 | * 6 | * Copyright (c) 1998 Harald Koerfgen 7 | */ 8 | #include 9 | 10 | #ifndef __ASM_ISADEP_H 11 | #define __ASM_ISADEP_H 12 | 13 | #if defined(CONFIG_CPU_R3000) 14 | /* 15 | * R2000 or R3000 16 | */ 17 | 18 | /* 19 | * kernel or user mode? (CP0_STATUS) 20 | */ 21 | #define KU_MASK 0x08 22 | #define KU_USER 0x08 23 | #define KU_KERN 0x00 24 | 25 | #else 26 | /* 27 | * kernel or user mode? 28 | */ 29 | #define KU_MASK 0x18 30 | #define KU_USER 0x10 31 | #define KU_KERN 0x00 32 | 33 | #endif 34 | 35 | #endif /* __ASM_ISADEP_H */ 36 | -------------------------------------------------------------------------------- /include/asm-mips/reg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Various register offset definitions for debuggers, core file 3 | * examiners and whatnot. 4 | * 5 | * This file is subject to the terms and conditions of the GNU General Public 6 | * License. See the file "COPYING" in the main directory of this archive 7 | * for more details. 8 | * 9 | * Copyright (C) 1995, 1999 by Ralf Baechle 10 | */ 11 | #ifndef __ASM_MIPS_REG_H 12 | #define __ASM_MIPS_REG_H 13 | 14 | /* 15 | * This defines/structures correspond to the register layout on stack - 16 | * if the order here is changed, it needs to be updated in 17 | * include/asm-mips/stackframe.h 18 | */ 19 | #define EF_REG0 6 20 | #define EF_REG1 7 21 | #define EF_REG2 8 22 | #define EF_REG3 9 23 | #define EF_REG4 10 24 | #define EF_REG5 11 25 | #define EF_REG6 12 26 | #define EF_REG7 13 27 | #define EF_REG8 14 28 | #define EF_REG9 15 29 | #define EF_REG10 16 30 | #define EF_REG11 17 31 | #define EF_REG12 18 32 | #define EF_REG13 19 33 | #define EF_REG14 20 34 | #define EF_REG15 21 35 | #define EF_REG16 22 36 | #define EF_REG17 23 37 | #define EF_REG18 24 38 | #define EF_REG19 25 39 | #define EF_REG20 26 40 | #define EF_REG21 27 41 | #define EF_REG22 28 42 | #define EF_REG23 29 43 | #define EF_REG24 30 44 | #define EF_REG25 31 45 | /* 46 | * k0/k1 unsaved 47 | */ 48 | #define EF_REG28 34 49 | #define EF_REG29 35 50 | #define EF_REG30 36 51 | #define EF_REG31 37 52 | 53 | /* 54 | * Saved special registers 55 | */ 56 | #define EF_LO 38 57 | #define EF_HI 39 58 | 59 | #define EF_CP0_EPC 40 60 | #define EF_CP0_BADVADDR 41 61 | #define EF_CP0_STATUS 42 62 | #define EF_CP0_CAUSE 44 63 | 64 | #define EF_SIZE 180 /* size in bytes */ 65 | 66 | #endif /* __ASM_MIPS_REG_H */ 67 | -------------------------------------------------------------------------------- /include/asm-mips/regdef.h: -------------------------------------------------------------------------------- 1 | /* 2 | * include/asm-mips/regdefs.h 3 | * 4 | * This file is subject to the terms and conditions of the GNU General Public 5 | * License. See the file "COPYING" in the main directory of this archive 6 | * for more details. 7 | * 8 | * Copyright (C) 1994, 1995 by Ralf Baechle 9 | */ 10 | 11 | #ifndef __ASM_MIPS_REGDEF_H 12 | #define __ASM_MIPS_REGDEF_H 13 | 14 | /* 15 | * Symbolic register names for 32 bit ABI 16 | */ 17 | #define zero $0 /* wired zero */ 18 | #define AT $1 /* assembler temp - uppercase because of ".set at" */ 19 | #define v0 $2 /* return value */ 20 | #define v1 $3 21 | #define a0 $4 /* argument registers */ 22 | #define a1 $5 23 | #define a2 $6 24 | #define a3 $7 25 | #define t0 $8 /* caller saved */ 26 | #define t1 $9 27 | #define t2 $10 28 | #define t3 $11 29 | #define t4 $12 30 | #define t5 $13 31 | #define t6 $14 32 | #define t7 $15 33 | #define s0 $16 /* callee saved */ 34 | #define s1 $17 35 | #define s2 $18 36 | #define s3 $19 37 | #define s4 $20 38 | #define s5 $21 39 | #define s6 $22 40 | #define s7 $23 41 | #define t8 $24 /* caller saved */ 42 | #define t9 $25 43 | #define jp $25 /* PIC jump register */ 44 | #define k0 $26 /* kernel scratch */ 45 | #define k1 $27 46 | #define gp $28 /* global pointer */ 47 | #define sp $29 /* stack pointer */ 48 | #define fp $30 /* frame pointer */ 49 | #define s8 $30 /* same like fp! */ 50 | #define ra $31 /* return address */ 51 | 52 | #endif /* __ASM_MIPS_REGDEF_H */ 53 | -------------------------------------------------------------------------------- /include/asm-mips/sgidefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is subject to the terms and conditions of the GNU General Public 3 | * License. See the file "COPYING" in the main directory of this archive 4 | * for more details. 5 | * 6 | * Copyright (C) 1996, 1999, 2001 Ralf Baechle 7 | * Copyright (C) 1999 Silicon Graphics, Inc. 8 | * Copyright (C) 2001 MIPS Technologies, Inc. 9 | */ 10 | #ifndef __ASM_SGIDEFS_H 11 | #define __ASM_SGIDEFS_H 12 | 13 | /* 14 | * Using a Linux compiler for building Linux seems logic but not to 15 | * everybody. 16 | */ 17 | #if 0 /* ndef __linux__ */ 18 | #error Use a Linux compiler or give up. 19 | #endif 20 | 21 | /* 22 | * Definitions for the ISA levels 23 | * 24 | * With the introduction of MIPS32 / MIPS64 instruction sets definitions 25 | * MIPS ISAs are no longer subsets of each other. Therefore comparisons 26 | * on these symbols except with == may result in unexpected results and 27 | * are forbidden! 28 | */ 29 | #define _MIPS_ISA_MIPS1 1 30 | #define _MIPS_ISA_MIPS2 2 31 | #define _MIPS_ISA_MIPS3 3 32 | #define _MIPS_ISA_MIPS4 4 33 | #define _MIPS_ISA_MIPS5 5 34 | #define _MIPS_ISA_MIPS32 6 35 | #define _MIPS_ISA_MIPS64 7 36 | 37 | /* 38 | * Subprogram calling convention 39 | */ 40 | #define _MIPS_SIM_ABI32 1 41 | #define _MIPS_SIM_NABI32 2 42 | #define _MIPS_SIM_ABI64 3 43 | 44 | #endif /* __ASM_SGIDEFS_H */ 45 | -------------------------------------------------------------------------------- /include/asm-mips/types.h: -------------------------------------------------------------------------------- 1 | /* $Id: //WIFI_SOC/MP/SDK_4_3_0_0/Uboot/include/asm-mips/types.h#1 $ 2 | * 3 | * This file is subject to the terms and conditions of the GNU General Public 4 | * License. See the file "COPYING" in the main directory of this archive 5 | * for more details. 6 | * 7 | * Copyright (C) 1994, 1995, 1996, 1999 by Ralf Baechle 8 | * Copyright (C) 1999 Silicon Graphics, Inc. 9 | */ 10 | #ifndef _ASM_TYPES_H 11 | #define _ASM_TYPES_H 12 | 13 | typedef unsigned short umode_t; 14 | 15 | /* 16 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the 17 | * header files exported to user space 18 | */ 19 | 20 | typedef __signed__ char __s8; 21 | typedef unsigned char __u8; 22 | 23 | typedef __signed__ short __s16; 24 | typedef unsigned short __u16; 25 | 26 | typedef __signed__ int __s32; 27 | typedef unsigned int __u32; 28 | 29 | #if (_MIPS_SZLONG == 64) 30 | 31 | typedef __signed__ long __s64; 32 | typedef unsigned long __u64; 33 | 34 | #else 35 | 36 | #if defined(__GNUC__) && !defined(__STRICT_ANSI__) 37 | typedef __signed__ long long __s64; 38 | typedef unsigned long long __u64; 39 | #endif 40 | 41 | #endif 42 | 43 | /* 44 | * These aren't exported outside the kernel to avoid name space clashes 45 | */ 46 | #ifdef __KERNEL__ 47 | 48 | typedef __signed char s8; 49 | typedef unsigned char u8; 50 | 51 | typedef __signed short s16; 52 | typedef unsigned short u16; 53 | 54 | typedef __signed int s32; 55 | typedef unsigned int u32; 56 | 57 | #if (_MIPS_SZLONG == 64) 58 | 59 | typedef __signed__ long s64; 60 | typedef unsigned long u64; 61 | 62 | #else 63 | 64 | #if defined(__GNUC__) && !defined(__STRICT_ANSI__) 65 | typedef __signed__ long long s64; 66 | typedef unsigned long long u64; 67 | #endif 68 | 69 | #endif 70 | 71 | #define BITS_PER_LONG _MIPS_SZLONG 72 | 73 | typedef unsigned long dma_addr_t; 74 | 75 | #endif /* __KERNEL__ */ 76 | 77 | #endif /* _ASM_TYPES_H */ 78 | -------------------------------------------------------------------------------- /include/asm-mips/u-boot.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2003 3 | * Wolfgang Denk, DENX Software Engineering, 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | 24 | #ifndef _U_BOOT_H_ 25 | #define _U_BOOT_H_ 1 26 | 27 | typedef struct bd_info { 28 | int bi_baudrate; /* serial console baudrate */ 29 | unsigned long bi_ip_addr; /* IP Address */ 30 | unsigned char bi_enetaddr[6]; /* Ethernet adress */ 31 | unsigned long bi_arch_number; /* unique id for this board */ 32 | unsigned long bi_boot_params; /* where this board expects params */ 33 | unsigned long bi_memstart; /* start of DRAM memory */ 34 | unsigned long bi_memsize; /* size of DRAM memory in bytes */ 35 | unsigned long bi_flashstart; /* start of FLASH memory */ 36 | unsigned long bi_flashsize; /* size of FLASH memory */ 37 | unsigned long bi_flashoffset; /* reserved area for startup monitor */ 38 | } bd_t; 39 | #define bi_env_data bi_env->data 40 | #define bi_env_crc bi_env->crc 41 | 42 | #endif /* _U_BOOT_H_ */ 43 | -------------------------------------------------------------------------------- /include/asm/byteorder.h: -------------------------------------------------------------------------------- 1 | /* $Id: //WIFI_SOC/MP/SDK_4_3_0_0/Uboot/include/asm/byteorder.h#1 $ 2 | * 3 | * This file is subject to the terms and conditions of the GNU General Public 4 | * License. See the file "COPYING" in the main directory of this archive 5 | * for more details. 6 | * 7 | * Copyright (C) by Ralf Baechle 8 | */ 9 | #ifndef _MIPS_BYTEORDER_H 10 | #define _MIPS_BYTEORDER_H 11 | 12 | #include 13 | 14 | #ifdef __GNUC__ 15 | 16 | #if !defined(__STRICT_ANSI__) || defined(__KERNEL__) 17 | # define __BYTEORDER_HAS_U64__ 18 | # define __SWAB_64_THRU_32__ 19 | #endif 20 | 21 | #endif /* __GNUC__ */ 22 | 23 | #if defined (__MIPSEB__) 24 | # include 25 | #elif defined (__MIPSEL__) 26 | # include 27 | #else 28 | # error "MIPS, but neither __MIPSEB__, nor __MIPSEL__???" 29 | #endif 30 | 31 | #endif /* _MIPS_BYTEORDER_H */ 32 | -------------------------------------------------------------------------------- /include/asm/cache.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011 The Chromium OS Authors. 3 | * 4 | * SPDX-License-Identifier: GPL-2.0+ 5 | */ 6 | 7 | #ifndef __MIPS_CACHE_H__ 8 | #define __MIPS_CACHE_H__ 9 | 10 | #define CONFIG_SYS_CACHELINE_SIZE 32 11 | 12 | /* 13 | * The maximum L1 data cache line size on MIPS seems to be 128 bytes. We use 14 | * that as a default for aligning DMA buffers unless the board config has 15 | * specified another cache line size. 16 | */ 17 | #ifdef CONFIG_SYS_CACHELINE_SIZE 18 | #define ARCH_DMA_MINALIGN CONFIG_SYS_CACHELINE_SIZE 19 | #else 20 | #define ARCH_DMA_MINALIGN 128 21 | #endif 22 | 23 | #endif /* __MIPS_CACHE_H__ */ 24 | -------------------------------------------------------------------------------- /include/asm/cachectl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * cachectl.h -- defines for MIPS cache control system calls 3 | * 4 | * Copyright (C) 1994, 1995, 1996 by Ralf Baechle 5 | */ 6 | #ifndef __ASM_MIPS_CACHECTL 7 | #define __ASM_MIPS_CACHECTL 8 | 9 | /* 10 | * Options for cacheflush system call 11 | */ 12 | #define ICACHE (1<<0) /* flush instruction cache */ 13 | #define DCACHE (1<<1) /* writeback and flush data cache */ 14 | #define BCACHE (ICACHE|DCACHE) /* flush both caches */ 15 | 16 | /* 17 | * Caching modes for the cachectl(2) call 18 | * 19 | * cachectl(2) is currently not supported and returns ENOSYS. 20 | */ 21 | #define CACHEABLE 0 /* make pages cacheable */ 22 | #define UNCACHEABLE 1 /* make pages uncacheable */ 23 | 24 | #endif /* __ASM_MIPS_CACHECTL */ 25 | -------------------------------------------------------------------------------- /include/asm/cacheops.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Cache operations for the cache instruction. 3 | * 4 | * This file is subject to the terms and conditions of the GNU General Public 5 | * License. See the file "COPYING" in the main directory of this archive 6 | * for more details. 7 | * 8 | * (C) Copyright 1996, 1997 by Ralf Baechle 9 | */ 10 | #ifndef __ASM_MIPS_CACHEOPS_H 11 | #define __ASM_MIPS_CACHEOPS_H 12 | 13 | /* 14 | * Cache Operations 15 | */ 16 | #define Index_Invalidate_I 0x00 17 | #define Index_Writeback_Inv_D 0x01 18 | #define Index_Invalidate_SI 0x02 19 | #define Index_Writeback_Inv_SD 0x03 20 | #define Index_Load_Tag_I 0x04 21 | #define Index_Load_Tag_D 0x05 22 | #define Index_Load_Tag_SI 0x06 23 | #define Index_Load_Tag_SD 0x07 24 | #define Index_Store_Tag_I 0x08 25 | #define Index_Store_Tag_D 0x09 26 | #define Index_Store_Tag_SI 0x0A 27 | #define Index_Store_Tag_SD 0x0B 28 | #define Create_Dirty_Excl_D 0x0d 29 | #define Create_Dirty_Excl_SD 0x0f 30 | #define Hit_Invalidate_I 0x10 31 | #define Hit_Invalidate_D 0x11 32 | #define Hit_Invalidate_SI 0x12 33 | #define Hit_Invalidate_SD 0x13 34 | #define Fill 0x14 35 | #define Hit_Writeback_Inv_D 0x15 36 | /* 0x16 is unused */ 37 | #define Hit_Writeback_Inv_SD 0x17 38 | #define Hit_Writeback_I 0x18 39 | #define Hit_Writeback_D 0x19 40 | /* 0x1a is unused */ 41 | #define Hit_Writeback_SD 0x1b 42 | /* 0x1c is unused */ 43 | /* 0x1e is unused */ 44 | #define Hit_Set_Virtual_SI 0x1e 45 | #define Hit_Set_Virtual_SD 0x1f 46 | 47 | #endif /* __ASM_MIPS_CACHEOPS_H */ 48 | -------------------------------------------------------------------------------- /include/asm/errno-base.h: -------------------------------------------------------------------------------- 1 | #ifndef _ASM_GENERIC_ERRNO_BASE_H 2 | #define _ASM_GENERIC_ERRNO_BASE_H 3 | 4 | #define EPERM 1 /* Operation not permitted */ 5 | #define ENOENT 2 /* No such file or directory */ 6 | #define ESRCH 3 /* No such process */ 7 | #define EINTR 4 /* Interrupted system call */ 8 | #define EIO 5 /* I/O error */ 9 | #define ENXIO 6 /* No such device or address */ 10 | #define E2BIG 7 /* Argument list too long */ 11 | #define ENOEXEC 8 /* Exec format error */ 12 | #define EBADF 9 /* Bad file number */ 13 | #define ECHILD 10 /* No child processes */ 14 | #define EAGAIN 11 /* Try again */ 15 | #define ENOMEM 12 /* Out of memory */ 16 | #define EACCES 13 /* Permission denied */ 17 | #define EFAULT 14 /* Bad address */ 18 | #define ENOTBLK 15 /* Block device required */ 19 | #define EBUSY 16 /* Device or resource busy */ 20 | #define EEXIST 17 /* File exists */ 21 | #define EXDEV 18 /* Cross-device link */ 22 | #define ENODEV 19 /* No such device */ 23 | #define ENOTDIR 20 /* Not a directory */ 24 | #define EISDIR 21 /* Is a directory */ 25 | #define EINVAL 22 /* Invalid argument */ 26 | #define ENFILE 23 /* File table overflow */ 27 | #define EMFILE 24 /* Too many open files */ 28 | #define ENOTTY 25 /* Not a typewriter */ 29 | #define ETXTBSY 26 /* Text file busy */ 30 | #define EFBIG 27 /* File too large */ 31 | #define ENOSPC 28 /* No space left on device */ 32 | #define ESPIPE 29 /* Illegal seek */ 33 | #define EROFS 30 /* Read-only file system */ 34 | #define EMLINK 31 /* Too many links */ 35 | #define EPIPE 32 /* Broken pipe */ 36 | #define EDOM 33 /* Math argument out of domain of func */ 37 | #define ERANGE 34 /* Math result not representable */ 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /include/asm/global_data.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2002-2003 3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | 24 | #ifndef __ASM_GBL_DATA_H 25 | #define __ASM_GBL_DATA_H 26 | 27 | #include 28 | 29 | /* 30 | * The following data structure is placed in some memory wich is 31 | * available very early after boot (like DPRAM on MPC8xx/MPC82xx, or 32 | * some locked parts of the data cache) to allow for a minimum set of 33 | * global variables during system initialization (until we have set 34 | * up the memory controller so that we can use RAM). 35 | * 36 | * Keep it *SMALL* and remember to set CFG_GBL_DATA_SIZE > sizeof(gd_t) 37 | */ 38 | 39 | typedef struct global_data { 40 | bd_t *bd; 41 | unsigned long flags; 42 | unsigned long baudrate; 43 | unsigned long have_console; /* serial_init() was called */ 44 | unsigned long ram_size; /* RAM size */ 45 | unsigned long reloc_off; /* Relocation Offset */ 46 | unsigned long env_addr; /* Address of Environment struct */ 47 | unsigned long env_valid; /* Checksum of Environment valid? */ 48 | void **jt; /* jump table */ 49 | } gd_t; 50 | 51 | /* 52 | * Global Data Flags 53 | */ 54 | #define GD_FLG_RELOC 0x00001 /* Code was relocated to RAM */ 55 | #define GD_FLG_DEVINIT 0x00002 /* Devices have been initialized */ 56 | #define GD_FLG_SILENT 0x00004 /* Silent mode */ 57 | 58 | #define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("k0") 59 | 60 | #endif /* __ASM_GBL_DATA_H */ 61 | -------------------------------------------------------------------------------- /include/asm/inca-ip.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinney/MT7621-u-boot-mod/f546d5f423b00be6422703ef794b0526c9b74a4d/include/asm/inca-ip.h -------------------------------------------------------------------------------- /include/asm/isadep.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Various ISA level dependant constants. 3 | * Most of the following constants reflect the different layout 4 | * of Coprocessor 0 registers. 5 | * 6 | * Copyright (c) 1998 Harald Koerfgen 7 | */ 8 | #include 9 | 10 | #ifndef __ASM_ISADEP_H 11 | #define __ASM_ISADEP_H 12 | 13 | #if defined(CONFIG_CPU_R3000) 14 | /* 15 | * R2000 or R3000 16 | */ 17 | 18 | /* 19 | * kernel or user mode? (CP0_STATUS) 20 | */ 21 | #define KU_MASK 0x08 22 | #define KU_USER 0x08 23 | #define KU_KERN 0x00 24 | 25 | #else 26 | /* 27 | * kernel or user mode? 28 | */ 29 | #define KU_MASK 0x18 30 | #define KU_USER 0x10 31 | #define KU_KERN 0x00 32 | 33 | #endif 34 | 35 | #endif /* __ASM_ISADEP_H */ 36 | -------------------------------------------------------------------------------- /include/asm/reg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Various register offset definitions for debuggers, core file 3 | * examiners and whatnot. 4 | * 5 | * This file is subject to the terms and conditions of the GNU General Public 6 | * License. See the file "COPYING" in the main directory of this archive 7 | * for more details. 8 | * 9 | * Copyright (C) 1995, 1999 by Ralf Baechle 10 | */ 11 | #ifndef __ASM_MIPS_REG_H 12 | #define __ASM_MIPS_REG_H 13 | 14 | /* 15 | * This defines/structures correspond to the register layout on stack - 16 | * if the order here is changed, it needs to be updated in 17 | * include/asm-mips/stackframe.h 18 | */ 19 | #define EF_REG0 6 20 | #define EF_REG1 7 21 | #define EF_REG2 8 22 | #define EF_REG3 9 23 | #define EF_REG4 10 24 | #define EF_REG5 11 25 | #define EF_REG6 12 26 | #define EF_REG7 13 27 | #define EF_REG8 14 28 | #define EF_REG9 15 29 | #define EF_REG10 16 30 | #define EF_REG11 17 31 | #define EF_REG12 18 32 | #define EF_REG13 19 33 | #define EF_REG14 20 34 | #define EF_REG15 21 35 | #define EF_REG16 22 36 | #define EF_REG17 23 37 | #define EF_REG18 24 38 | #define EF_REG19 25 39 | #define EF_REG20 26 40 | #define EF_REG21 27 41 | #define EF_REG22 28 42 | #define EF_REG23 29 43 | #define EF_REG24 30 44 | #define EF_REG25 31 45 | /* 46 | * k0/k1 unsaved 47 | */ 48 | #define EF_REG28 34 49 | #define EF_REG29 35 50 | #define EF_REG30 36 51 | #define EF_REG31 37 52 | 53 | /* 54 | * Saved special registers 55 | */ 56 | #define EF_LO 38 57 | #define EF_HI 39 58 | 59 | #define EF_CP0_EPC 40 60 | #define EF_CP0_BADVADDR 41 61 | #define EF_CP0_STATUS 42 62 | #define EF_CP0_CAUSE 44 63 | 64 | #define EF_SIZE 180 /* size in bytes */ 65 | 66 | #endif /* __ASM_MIPS_REG_H */ 67 | -------------------------------------------------------------------------------- /include/asm/regdef.h: -------------------------------------------------------------------------------- 1 | /* 2 | * include/asm-mips/regdefs.h 3 | * 4 | * This file is subject to the terms and conditions of the GNU General Public 5 | * License. See the file "COPYING" in the main directory of this archive 6 | * for more details. 7 | * 8 | * Copyright (C) 1994, 1995 by Ralf Baechle 9 | */ 10 | 11 | #ifndef __ASM_MIPS_REGDEF_H 12 | #define __ASM_MIPS_REGDEF_H 13 | 14 | /* 15 | * Symbolic register names for 32 bit ABI 16 | */ 17 | #define zero $0 /* wired zero */ 18 | #define AT $1 /* assembler temp - uppercase because of ".set at" */ 19 | #define v0 $2 /* return value */ 20 | #define v1 $3 21 | #define a0 $4 /* argument registers */ 22 | #define a1 $5 23 | #define a2 $6 24 | #define a3 $7 25 | #define t0 $8 /* caller saved */ 26 | #define t1 $9 27 | #define t2 $10 28 | #define t3 $11 29 | #define t4 $12 30 | #define t5 $13 31 | #define t6 $14 32 | #define t7 $15 33 | #define s0 $16 /* callee saved */ 34 | #define s1 $17 35 | #define s2 $18 36 | #define s3 $19 37 | #define s4 $20 38 | #define s5 $21 39 | #define s6 $22 40 | #define s7 $23 41 | #define t8 $24 /* caller saved */ 42 | #define t9 $25 43 | #define jp $25 /* PIC jump register */ 44 | #define k0 $26 /* kernel scratch */ 45 | #define k1 $27 46 | #define gp $28 /* global pointer */ 47 | #define sp $29 /* stack pointer */ 48 | #define fp $30 /* frame pointer */ 49 | #define s8 $30 /* same like fp! */ 50 | #define ra $31 /* return address */ 51 | 52 | #endif /* __ASM_MIPS_REGDEF_H */ 53 | -------------------------------------------------------------------------------- /include/asm/sgidefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is subject to the terms and conditions of the GNU General Public 3 | * License. See the file "COPYING" in the main directory of this archive 4 | * for more details. 5 | * 6 | * Copyright (C) 1996, 1999, 2001 Ralf Baechle 7 | * Copyright (C) 1999 Silicon Graphics, Inc. 8 | * Copyright (C) 2001 MIPS Technologies, Inc. 9 | */ 10 | #ifndef __ASM_SGIDEFS_H 11 | #define __ASM_SGIDEFS_H 12 | 13 | /* 14 | * Using a Linux compiler for building Linux seems logic but not to 15 | * everybody. 16 | */ 17 | #if 0 /* ndef __linux__ */ 18 | #error Use a Linux compiler or give up. 19 | #endif 20 | 21 | /* 22 | * Definitions for the ISA levels 23 | * 24 | * With the introduction of MIPS32 / MIPS64 instruction sets definitions 25 | * MIPS ISAs are no longer subsets of each other. Therefore comparisons 26 | * on these symbols except with == may result in unexpected results and 27 | * are forbidden! 28 | */ 29 | #define _MIPS_ISA_MIPS1 1 30 | #define _MIPS_ISA_MIPS2 2 31 | #define _MIPS_ISA_MIPS3 3 32 | #define _MIPS_ISA_MIPS4 4 33 | #define _MIPS_ISA_MIPS5 5 34 | #define _MIPS_ISA_MIPS32 6 35 | #define _MIPS_ISA_MIPS64 7 36 | 37 | /* 38 | * Subprogram calling convention 39 | */ 40 | #define _MIPS_SIM_ABI32 1 41 | #define _MIPS_SIM_NABI32 2 42 | #define _MIPS_SIM_ABI64 3 43 | 44 | #endif /* __ASM_SGIDEFS_H */ 45 | -------------------------------------------------------------------------------- /include/asm/types.h: -------------------------------------------------------------------------------- 1 | /* $Id: //WIFI_SOC/MP/SDK_4_3_0_0/Uboot/include/asm/types.h#1 $ 2 | * 3 | * This file is subject to the terms and conditions of the GNU General Public 4 | * License. See the file "COPYING" in the main directory of this archive 5 | * for more details. 6 | * 7 | * Copyright (C) 1994, 1995, 1996, 1999 by Ralf Baechle 8 | * Copyright (C) 1999 Silicon Graphics, Inc. 9 | */ 10 | #ifndef _ASM_TYPES_H 11 | #define _ASM_TYPES_H 12 | 13 | typedef unsigned short umode_t; 14 | 15 | /* 16 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the 17 | * header files exported to user space 18 | */ 19 | 20 | typedef __signed__ char __s8; 21 | typedef unsigned char __u8; 22 | 23 | typedef __signed__ short __s16; 24 | typedef unsigned short __u16; 25 | 26 | typedef __signed__ int __s32; 27 | typedef unsigned int __u32; 28 | 29 | #if (_MIPS_SZLONG == 64) 30 | 31 | typedef __signed__ long __s64; 32 | typedef unsigned long __u64; 33 | 34 | #else 35 | 36 | #if defined(__GNUC__) && !defined(__STRICT_ANSI__) 37 | typedef __signed__ long long __s64; 38 | typedef unsigned long long __u64; 39 | #endif 40 | 41 | #endif 42 | 43 | /* 44 | * These aren't exported outside the kernel to avoid name space clashes 45 | */ 46 | #ifdef __KERNEL__ 47 | 48 | typedef __signed char s8; 49 | typedef unsigned char u8; 50 | 51 | typedef __signed short s16; 52 | typedef unsigned short u16; 53 | 54 | typedef __signed int s32; 55 | typedef unsigned int u32; 56 | 57 | #if (_MIPS_SZLONG == 64) 58 | 59 | typedef __signed__ long s64; 60 | typedef unsigned long u64; 61 | 62 | #else 63 | 64 | #if defined(__GNUC__) && !defined(__STRICT_ANSI__) 65 | typedef __signed__ long long s64; 66 | typedef unsigned long long u64; 67 | #endif 68 | 69 | #endif 70 | 71 | #define BITS_PER_LONG _MIPS_SZLONG 72 | 73 | typedef unsigned long dma_addr_t; 74 | 75 | #endif /* __KERNEL__ */ 76 | 77 | #endif /* _ASM_TYPES_H */ 78 | -------------------------------------------------------------------------------- /include/asm/u-boot.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2003 3 | * Wolfgang Denk, DENX Software Engineering, 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | 24 | #ifndef _U_BOOT_H_ 25 | #define _U_BOOT_H_ 1 26 | 27 | typedef struct bd_info { 28 | int bi_baudrate; /* serial console baudrate */ 29 | unsigned long bi_ip_addr; /* IP Address */ 30 | unsigned char bi_enetaddr[6]; /* Ethernet adress */ 31 | unsigned long bi_arch_number; /* unique id for this board */ 32 | unsigned long bi_boot_params; /* where this board expects params */ 33 | unsigned long bi_memstart; /* start of DRAM memory */ 34 | unsigned long bi_memsize; /* size of DRAM memory in bytes */ 35 | unsigned long bi_flashstart; /* start of FLASH memory */ 36 | unsigned long bi_flashsize; /* size of FLASH memory */ 37 | unsigned long bi_flashoffset; /* reserved area for startup monitor */ 38 | } bd_t; 39 | #define bi_env_data bi_env->data 40 | #define bi_env_crc bi_env->crc 41 | 42 | #endif /* _U_BOOT_H_ */ 43 | -------------------------------------------------------------------------------- /include/asm/unaligned.h: -------------------------------------------------------------------------------- 1 | #ifndef _GENERIC_UNALIGNED_H 2 | #define _GENERIC_UNALIGNED_H 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | /* 11 | * Select endianness 12 | */ 13 | #if defined(__LITTLE_ENDIAN) 14 | #define get_unaligned __get_unaligned_le 15 | #define put_unaligned __put_unaligned_le 16 | #elif defined(__BIG_ENDIAN) 17 | #define get_unaligned __get_unaligned_be 18 | #define put_unaligned __put_unaligned_be 19 | #else 20 | #error invalid endian 21 | #endif 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /include/bedbug/bedbug.h: -------------------------------------------------------------------------------- 1 | /* $Id: //WIFI_SOC/MP/SDK_4_3_0_0/Uboot/include/bedbug/bedbug.h#1 $ */ 2 | 3 | #ifndef _BEDBUG_H 4 | #define _BEDBUG_H 5 | 6 | #ifndef NULL 7 | #define NULL 0 8 | #endif 9 | 10 | #define _USE_PROTOTYPES 11 | 12 | #ifndef isblank 13 | #define isblank(c) isspace((int)(c)) 14 | #endif 15 | 16 | #ifndef __P 17 | #if defined(_USE_PROTOTYPES) && (defined(__STDC__) || defined(__cplusplus)) 18 | #define __P(protos) protos /* full-blown ANSI C */ 19 | #else 20 | #define __P(protos) () /* traditional C preprocessor */ 21 | #endif 22 | #endif 23 | 24 | #define assert( condition ) if( (condition) ) _exit(0) 25 | 26 | #endif /* _BEDBUG_H */ 27 | 28 | 29 | /* 30 | * Copyright (c) 2001 William L. Pitts 31 | * All rights reserved. 32 | * 33 | * Redistribution and use in source and binary forms are freely 34 | * permitted provided that the above copyright notice and this 35 | * paragraph and the following disclaimer are duplicated in all 36 | * such forms. 37 | * 38 | * This software is provided "AS IS" and without any express or 39 | * implied warranties, including, without limitation, the implied 40 | * warranties of merchantability and fitness for a particular 41 | * purpose. 42 | */ 43 | -------------------------------------------------------------------------------- /include/bedbug/type.h: -------------------------------------------------------------------------------- 1 | #ifndef _TYPE_BEDBUG_H 2 | #define _TYPE_BEDBUG_H 3 | 4 | /* Supporting routines */ 5 | int bedbug_puts (const char *); 6 | void bedbug_init (void); 7 | void bedbug860_init (void); 8 | void do_bedbug_breakpoint (struct pt_regs *); 9 | void bedbug_main_loop (unsigned long, struct pt_regs *); 10 | 11 | 12 | typedef struct { 13 | int hw_debug_enabled; 14 | int stopped; 15 | int current_bp; 16 | struct pt_regs *regs; 17 | 18 | void (*do_break) (cmd_tbl_t *, int, int, char *[]); 19 | void (*break_isr) (struct pt_regs *); 20 | int (*find_empty) (void); 21 | int (*set) (int, unsigned long); 22 | int (*clear) (int); 23 | } CPU_DEBUG_CTX; 24 | 25 | 26 | #endif /* _TYPE_BEDBUG_H */ 27 | -------------------------------------------------------------------------------- /include/circbuf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2003 3 | * Gerry Hamel, geh@ti.com, Texas Instruments 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | */ 20 | 21 | #ifndef __CIRCBUF_H__ 22 | #define __CIRCBUF_H__ 23 | 24 | typedef struct circbuf { 25 | unsigned int size; /* current number of bytes held */ 26 | unsigned int totalsize; /* number of bytes allocated */ 27 | 28 | char *top; /* pointer to current buffer start */ 29 | char *tail; /* pointer to space for next element */ 30 | 31 | char *data; /* all data */ 32 | char *end; /* end of data buffer */ 33 | } circbuf_t; 34 | 35 | int buf_init (circbuf_t * buf, unsigned int size); 36 | int buf_free (circbuf_t * buf); 37 | int buf_pop (circbuf_t * buf, char *dest, unsigned int len); 38 | int buf_push (circbuf_t * buf, const char *src, unsigned int len); 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /include/compiler.h: -------------------------------------------------------------------------------- 1 | #ifndef __COMPILER_H__ 2 | #define __COMPILER_H__ 3 | 4 | #define likely(x) __builtin_expect(!!(x), 1) 5 | #define unlikely(x) __builtin_expect(!!(x), 0) 6 | 7 | #endif 8 | 9 | -------------------------------------------------------------------------------- /include/config.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /include/config.mk: -------------------------------------------------------------------------------- 1 | ARCH = mips 2 | CPU = ralink_soc 3 | BOARD = rt2880 4 | -------------------------------------------------------------------------------- /include/console.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2000 3 | * Paolo Scaffardi, AIRVENT SAM s.p.a - RIMINI(ITALY), arsenio@tin.it 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | 24 | #ifndef _CONSOLE_H_ 25 | #define _CONSOLE_H_ 26 | 27 | #include 28 | 29 | /* 30 | ** VARIABLES 31 | */ 32 | 33 | extern device_t *stdio_devices[] ; 34 | extern char *stdio_names[MAX_FILES] ; 35 | 36 | int console_realloc(int top); 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /include/exports.h: -------------------------------------------------------------------------------- 1 | #ifndef __EXPORTS_H__ 2 | #define __EXPORTS_H__ 3 | 4 | #ifndef __ASSEMBLY__ 5 | 6 | #include 7 | 8 | /* These are declarations of exported functions available in C code */ 9 | unsigned long get_version(void); 10 | int getc(void); 11 | int tstc(void); 12 | void putc(const char); 13 | void puts(const char*); 14 | void printf(const char* fmt, ...); 15 | void install_hdlr(int, interrupt_handler_t*, void*); 16 | void free_hdlr(int); 17 | void *malloc(size_t); 18 | void free(void*); 19 | void udelay(unsigned long); 20 | unsigned long get_timer(unsigned long); 21 | void vprintf(const char *, va_list); 22 | void do_reset (void); 23 | 24 | void app_startup(char **); 25 | 26 | #endif /* ifndef __ASSEMBLY__ */ 27 | 28 | enum { 29 | #define EXPORT_FUNC(x) XF_ ## x , 30 | #include <_exports.h> 31 | #undef EXPORT_FUNC 32 | 33 | XF_MAX 34 | }; 35 | 36 | #define XF_VERSION 2 37 | 38 | #if defined(CONFIG_I386) 39 | extern gd_t *global_data; 40 | #endif 41 | 42 | #endif /* __EXPORTS_H__ */ 43 | -------------------------------------------------------------------------------- /include/fat_old.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinney/MT7621-u-boot-mod/f546d5f423b00be6422703ef794b0526c9b74a4d/include/fat_old.h -------------------------------------------------------------------------------- /include/hush.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2001 3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | 24 | #ifndef _HUSH_H_ 25 | #define _HUSH_H_ 26 | 27 | #define FLAG_EXIT_FROM_LOOP 1 28 | #define FLAG_PARSE_SEMICOLON (1 << 1) /* symbol ';' is special for parser */ 29 | #define FLAG_REPARSING (1 << 2) /* >=2nd pass */ 30 | 31 | extern int u_boot_hush_start(void); 32 | extern int parse_string_outer(char *, int); 33 | extern int parse_file_outer(void); 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /include/ide.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2000 3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | 24 | #ifndef _IDE_H 25 | #define _IDE_H 26 | 27 | #define IDE_BUS(dev) (dev >> 1) 28 | 29 | #ifdef CONFIG_IDE_LED 30 | 31 | /* 32 | * LED Port 33 | */ 34 | #define LED_PORT ((uchar *)(PER8_BASE + 0x3000)) 35 | #define LED_IDE1 0x01 36 | #define LED_IDE2 0x02 37 | #define DEVICE_LED(d) ((d & 2) | ((d & 2) == 0)) /* depends on bit positions! */ 38 | 39 | #endif /* CONFIG_IDE_LED */ 40 | 41 | #ifdef CFG_64BIT_LBA 42 | typedef uint64_t lbaint_t; 43 | #else 44 | typedef ulong lbaint_t; 45 | #endif 46 | 47 | /* 48 | * Function Prototypes 49 | */ 50 | 51 | void ide_init (void); 52 | ulong ide_read (int device, lbaint_t blknr, ulong blkcnt, ulong *buffer); 53 | ulong ide_write (int device, lbaint_t blknr, ulong blkcnt, ulong *buffer); 54 | 55 | #endif /* _IDE_H */ 56 | -------------------------------------------------------------------------------- /include/kgdb.h: -------------------------------------------------------------------------------- 1 | #ifndef __KGDB_H__ 2 | #define __KGDB_H__ 3 | 4 | #include 5 | 6 | #define KGDBERR_BADPARAMS 1 7 | #define KGDBERR_NOTHEXDIG 2 8 | #define KGDBERR_MEMFAULT 3 9 | #define KGDBERR_NOSPACE 4 10 | #define KGDBERR_ALIGNFAULT 5 11 | 12 | #define KGDBDATA_MAXREGS 8 13 | #define KGDBDATA_MAXPRIV 8 14 | 15 | #define KGDBEXIT_TYPEMASK 0xff 16 | 17 | #define KGDBEXIT_KILL 0 18 | #define KGDBEXIT_CONTINUE 1 19 | #define KGDBEXIT_SINGLE 2 20 | 21 | #define KGDBEXIT_WITHADDR 0x100 22 | 23 | typedef 24 | struct { 25 | int num; 26 | unsigned long val; 27 | } 28 | kgdb_reg; 29 | 30 | typedef 31 | struct { 32 | int sigval; 33 | int extype; 34 | unsigned long exaddr; 35 | int nregs; 36 | kgdb_reg regs[KGDBDATA_MAXREGS]; 37 | unsigned long private[KGDBDATA_MAXPRIV]; 38 | } 39 | kgdb_data; 40 | 41 | /* these functions are provided by the generic kgdb support */ 42 | extern void kgdb_init(void); 43 | extern void kgdb_error(int); 44 | extern int kgdb_output_string(const char *, unsigned int); 45 | extern void breakpoint(void); 46 | 47 | /* these functions are provided by the platform specific kgdb support */ 48 | extern void kgdb_flush_cache_range(void *, void *); 49 | extern void kgdb_flush_cache_all(void); 50 | extern int kgdb_setjmp(long *); 51 | extern void kgdb_longjmp(long *, int); 52 | extern void kgdb_enter(struct pt_regs *, kgdb_data *); 53 | extern void kgdb_exit(struct pt_regs *, kgdb_data *); 54 | extern int kgdb_getregs(struct pt_regs *, char *, int); 55 | extern void kgdb_putreg(struct pt_regs *, int, char *, int); 56 | extern void kgdb_putregs(struct pt_regs *, char *, int); 57 | extern int kgdb_trap(struct pt_regs *); 58 | extern void kgdb_breakpoint(int argc, char *argv[]); 59 | 60 | /* these functions are provided by the platform serial driver */ 61 | extern void kgdb_serial_init(void); 62 | extern int getDebugChar(void); 63 | extern void putDebugChar(int); 64 | extern void putDebugStr(const char *); 65 | extern void kgdb_interruptible(int); 66 | 67 | /* this is referenced in the trap handler for the platform */ 68 | extern int (*debugger_exception_handler)(struct pt_regs *); 69 | 70 | #endif /* __KGDB_H__ */ 71 | -------------------------------------------------------------------------------- /include/launch.h: -------------------------------------------------------------------------------- 1 | 2 | /************************************************************************ 3 | * 4 | * loader_api.h 5 | * 6 | * API file for load image module 7 | * 8 | * ###################################################################### 9 | * 10 | * mips_start_of_header 11 | * 12 | * $Id: launch.h,v 1.6 2008-06-26 22:16:44 chris Exp $ 13 | * 14 | * Copyright (c) [Year(s)] MIPS Technologies, Inc. All rights reserved. 15 | * 16 | * Unpublished rights reserved under U.S. copyright law. 17 | * 18 | * PROPRIETARY/SECRET CONFIDENTIAL INFORMATION OF MIPS TECHNOLOGIES, 19 | * INC. FOR INTERNAL USE ONLY. 20 | * 21 | * Under no circumstances (contract or otherwise) may this information be 22 | * disclosed to, or copied, modified or used by anyone other than employees 23 | * or contractors of MIPS Technologies having a need to know. 24 | * 25 | * 26 | * mips_end_of_header 27 | * 28 | ************************************************************************/ 29 | 30 | 31 | #ifndef LAUNCH_H 32 | #define LAUNCH_H 33 | 34 | #ifndef _ASSEMBLER_ 35 | 36 | typedef struct { 37 | unsigned long pc; 38 | unsigned long gp; 39 | unsigned long sp; 40 | unsigned long a0; 41 | unsigned long _pad[3]; /* pad to cache line size to avoid thrashing */ 42 | unsigned long flags; 43 | } cpulaunch_t; 44 | 45 | #else 46 | 47 | #define LOG2CPULAUNCH 5 48 | #define LAUNCH_PC 0 49 | #define LAUNCH_GP 4 50 | #define LAUNCH_SP 8 51 | #define LAUNCH_A0 12 52 | #define LAUNCH_FLAGS 28 53 | 54 | #endif 55 | 56 | #define LAUNCH_FREADY 1 57 | #define LAUNCH_FGO 2 58 | #define LAUNCH_FGONE 4 59 | 60 | #define SCRLAUNCH 0x00000e00 61 | #define CPULAUNCH 0x00000f00 62 | #define NCPULAUNCH 8 63 | 64 | /* Polling period in count cycles for secondary CPU's */ 65 | #define LAUNCHPERIOD 10000 66 | 67 | #ifndef __ASSEMBLER__ 68 | int cpu_present (int); 69 | #endif 70 | 71 | #endif /* LAUNCH_H */ 72 | -------------------------------------------------------------------------------- /include/led.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | > File Name: include/led.h 3 | > Author: 4 | > Mail: 5 | > Created Time: 2015年04月11日 星期六 15时24分56秒 6 | ************************************************************************/ 7 | 8 | #ifndef _INCLUDE/LED_H 9 | #define _INCLUDE/LED_H 10 | void init_power_led(void); 11 | void control_power_led(int flag); 12 | #endif 13 | -------------------------------------------------------------------------------- /include/linux/bitops.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_BITOPS_H 2 | #define _LINUX_BITOPS_H 3 | 4 | 5 | /* 6 | * ffs: find first bit set. This is defined the same way as 7 | * the libc and compiler builtin ffs routines, therefore 8 | * differs in spirit from the above ffz (man ffs). 9 | */ 10 | 11 | static inline int generic_ffs(int x) 12 | { 13 | int r = 1; 14 | 15 | if (!x) 16 | return 0; 17 | if (!(x & 0xffff)) { 18 | x >>= 16; 19 | r += 16; 20 | } 21 | if (!(x & 0xff)) { 22 | x >>= 8; 23 | r += 8; 24 | } 25 | if (!(x & 0xf)) { 26 | x >>= 4; 27 | r += 4; 28 | } 29 | if (!(x & 3)) { 30 | x >>= 2; 31 | r += 2; 32 | } 33 | if (!(x & 1)) { 34 | x >>= 1; 35 | r += 1; 36 | } 37 | return r; 38 | } 39 | 40 | /* 41 | * hweightN: returns the hamming weight (i.e. the number 42 | * of bits set) of a N-bit word 43 | */ 44 | 45 | static inline unsigned int generic_hweight32(unsigned int w) 46 | { 47 | unsigned int res = (w & 0x55555555) + ((w >> 1) & 0x55555555); 48 | res = (res & 0x33333333) + ((res >> 2) & 0x33333333); 49 | res = (res & 0x0F0F0F0F) + ((res >> 4) & 0x0F0F0F0F); 50 | res = (res & 0x00FF00FF) + ((res >> 8) & 0x00FF00FF); 51 | return (res & 0x0000FFFF) + ((res >> 16) & 0x0000FFFF); 52 | } 53 | 54 | static inline unsigned int generic_hweight16(unsigned int w) 55 | { 56 | unsigned int res = (w & 0x5555) + ((w >> 1) & 0x5555); 57 | res = (res & 0x3333) + ((res >> 2) & 0x3333); 58 | res = (res & 0x0F0F) + ((res >> 4) & 0x0F0F); 59 | return (res & 0x00FF) + ((res >> 8) & 0x00FF); 60 | } 61 | 62 | static inline unsigned int generic_hweight8(unsigned int w) 63 | { 64 | unsigned int res = (w & 0x55) + ((w >> 1) & 0x55); 65 | res = (res & 0x33) + ((res >> 2) & 0x33); 66 | return (res & 0x0F) + ((res >> 4) & 0x0F); 67 | } 68 | 69 | #include 70 | 71 | 72 | #endif 73 | -------------------------------------------------------------------------------- /include/linux/compiler-gcc3.h: -------------------------------------------------------------------------------- 1 | #ifndef __LINUX_COMPILER_H 2 | #error "Please don't include directly, include instead." 3 | #endif 4 | 5 | #if __GNUC_MINOR__ < 2 6 | # error Sorry, your compiler is too old - please upgrade it. 7 | #endif 8 | 9 | #if __GNUC_MINOR__ >= 3 10 | # define __used __attribute__((__used__)) 11 | #else 12 | # define __used __attribute__((__unused__)) 13 | #endif 14 | 15 | #if __GNUC_MINOR__ >= 4 16 | #define __must_check __attribute__((warn_unused_result)) 17 | #endif 18 | 19 | #ifdef CONFIG_GCOV_KERNEL 20 | # if __GNUC_MINOR__ < 4 21 | # error "GCOV profiling support for gcc versions below 3.4 not included" 22 | # endif /* __GNUC_MINOR__ */ 23 | #endif /* CONFIG_GCOV_KERNEL */ 24 | 25 | /* 26 | * A trick to suppress uninitialized variable warning without generating any 27 | * code 28 | */ 29 | #define uninitialized_var(x) x = x 30 | 31 | #define __always_inline inline __attribute__((always_inline)) 32 | -------------------------------------------------------------------------------- /include/linux/config.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_CONFIG_H 2 | #define _LINUX_CONFIG_H 3 | 4 | /* #include */ 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /include/linux/ctype.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_CTYPE_H 2 | #define _LINUX_CTYPE_H 3 | 4 | /* 5 | * NOTE! This ctype does not handle EOF like the standard C 6 | * library is required to. 7 | */ 8 | 9 | #define _U 0x01 /* upper */ 10 | #define _L 0x02 /* lower */ 11 | #define _D 0x04 /* digit */ 12 | #define _C 0x08 /* cntrl */ 13 | #define _P 0x10 /* punct */ 14 | #define _S 0x20 /* white space (space/lf/tab) */ 15 | #define _X 0x40 /* hex digit */ 16 | #define _SP 0x80 /* hard space (0x20) */ 17 | 18 | extern unsigned char _ctype[]; 19 | 20 | #define __ismask(x) (_ctype[(int)(unsigned char)(x)]) 21 | 22 | #define isalnum(c) ((__ismask(c)&(_U|_L|_D)) != 0) 23 | #define isalpha(c) ((__ismask(c)&(_U|_L)) != 0) 24 | #define iscntrl(c) ((__ismask(c)&(_C)) != 0) 25 | #define isdigit(c) ((__ismask(c)&(_D)) != 0) 26 | #define isgraph(c) ((__ismask(c)&(_P|_U|_L|_D)) != 0) 27 | #define islower(c) ((__ismask(c)&(_L)) != 0) 28 | #define isprint(c) ((__ismask(c)&(_P|_U|_L|_D|_SP)) != 0) 29 | #define ispunct(c) ((__ismask(c)&(_P)) != 0) 30 | #define isspace(c) ((__ismask(c)&(_S)) != 0) 31 | #define isupper(c) ((__ismask(c)&(_U)) != 0) 32 | #define isxdigit(c) ((__ismask(c)&(_D|_X)) != 0) 33 | 34 | #define isascii(c) (((unsigned char)(c))<=0x7f) 35 | #define toascii(c) (((unsigned char)(c))&0x7f) 36 | 37 | static inline unsigned char __tolower(unsigned char c) 38 | { 39 | if (isupper(c)) 40 | c -= 'A'-'a'; 41 | return c; 42 | } 43 | 44 | static inline unsigned char __toupper(unsigned char c) 45 | { 46 | if (islower(c)) 47 | c -= 'a'-'A'; 48 | return c; 49 | } 50 | 51 | #define tolower(c) __tolower(c) 52 | #define toupper(c) __toupper(c) 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /include/linux/err.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_ERR_H 2 | #define _LINUX_ERR_H 3 | 4 | #include 5 | 6 | #include 7 | 8 | /* 9 | * Kernel pointers have redundant information, so we can use a 10 | * scheme where we can return either an error code or a dentry 11 | * pointer with the same return value. 12 | * 13 | * This should be a per-architecture thing, to allow different 14 | * error and pointer decisions. 15 | */ 16 | #define MAX_ERRNO 4095 17 | 18 | #ifndef __ASSEMBLY__ 19 | 20 | #define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO) 21 | 22 | static inline void * __must_check ERR_PTR(long error) 23 | { 24 | return (void *) error; 25 | } 26 | 27 | static inline long __must_check PTR_ERR(const void *ptr) 28 | { 29 | return (long) ptr; 30 | } 31 | 32 | static inline long __must_check IS_ERR(const void *ptr) 33 | { 34 | return IS_ERR_VALUE((unsigned long)ptr); 35 | } 36 | 37 | static inline long __must_check IS_ERR_OR_NULL(const void *ptr) 38 | { 39 | return !ptr || IS_ERR_VALUE((unsigned long)ptr); 40 | } 41 | 42 | /** 43 | * ERR_CAST - Explicitly cast an error-valued pointer to another pointer type 44 | * @ptr: The pointer to cast. 45 | * 46 | * Explicitly cast an error-valued pointer to another pointer type in such a 47 | * way as to make it clear that's what's going on. 48 | */ 49 | static inline void * __must_check ERR_CAST(const void *ptr) 50 | { 51 | /* cast away the const */ 52 | return (void *) ptr; 53 | } 54 | 55 | #endif 56 | 57 | #endif /* _LINUX_ERR_H */ 58 | -------------------------------------------------------------------------------- /include/linux/errno.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_ERRNO_H 2 | #define _LINUX_ERRNO_H 3 | 4 | #include 5 | 6 | #ifdef __KERNEL__ 7 | 8 | /* Should never be seen by user programs */ 9 | #define ERESTARTSYS 512 10 | #define ERESTARTNOINTR 513 11 | #define ERESTARTNOHAND 514 /* restart if no handler.. */ 12 | #define ENOIOCTLCMD 515 /* No ioctl command */ 13 | #define ERESTART_RESTARTBLOCK 516 /* restart by calling sys_restart_syscall */ 14 | 15 | /* Defined for the NFSv3 protocol */ 16 | #define EBADHANDLE 521 /* Illegal NFS file handle */ 17 | #define ENOTSYNC 522 /* Update synchronization mismatch */ 18 | #define EBADCOOKIE 523 /* Cookie is stale */ 19 | #define ENOTSUPP 524 /* Operation is not supported */ 20 | #define ETOOSMALL 525 /* Buffer or request is too small */ 21 | #define ESERVERFAULT 526 /* An untranslatable error occurred */ 22 | #define EBADTYPE 527 /* Type not supported by server */ 23 | #define EJUKEBOX 528 /* Request initiated, but will not complete before timeout */ 24 | #define EIOCBQUEUED 529 /* iocb queued, will get completion event */ 25 | #define EIOCBRETRY 530 /* iocb queued, will trigger a retry */ 26 | 27 | #endif 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /include/linux/mtd/nand_ecc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * drivers/mtd/nand_ecc.h 3 | * 4 | * Copyright (C) 2000 Steven J. Hill (sjhill@realitydiluted.com) 5 | * 6 | * $Id: //WIFI_SOC/main/RT288x_SDK/source/linux-2.6.21.x/include/linux/mtd/nand_ecc.h#1 $ 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License version 2 as 10 | * published by the Free Software Foundation. 11 | * 12 | * This file is the header for the ECC algorithm. 13 | */ 14 | 15 | #ifndef __MTD_NAND_ECC_H__ 16 | #define __MTD_NAND_ECC_H__ 17 | 18 | struct mtd_info; 19 | 20 | /* 21 | * Calculate 3 byte ECC code for 256 byte block 22 | */ 23 | int nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code); 24 | 25 | /* 26 | * Detect and correct a 1 bit error for 256 byte block 27 | */ 28 | int nand_correct_data(struct mtd_info *mtd, u_char *dat, u_char *read_ecc, u_char *calc_ecc); 29 | 30 | #endif /* __MTD_NAND_ECC_H__ */ 31 | -------------------------------------------------------------------------------- /include/linux/posix_types.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_POSIX_TYPES_H 2 | #define _LINUX_POSIX_TYPES_H 3 | 4 | #include 5 | 6 | /* 7 | * This allows for 1024 file descriptors: if NR_OPEN is ever grown 8 | * beyond that you'll have to change this too. But 1024 fd's seem to be 9 | * enough even for such "real" unices like OSF/1, so hopefully this is 10 | * one limit that doesn't have to be changed [again]. 11 | * 12 | * Note that POSIX wants the FD_CLEAR(fd,fdsetp) defines to be in 13 | * (and thus ) - but this is a more logical 14 | * place for them. Solved by having dummy defines in . 15 | */ 16 | 17 | /* 18 | * Those macros may have been defined in . But we always 19 | * use the ones here. 20 | */ 21 | #undef __NFDBITS 22 | #define __NFDBITS (8 * sizeof(unsigned long)) 23 | 24 | #undef __FD_SETSIZE 25 | #define __FD_SETSIZE 1024 26 | 27 | #undef __FDSET_LONGS 28 | #define __FDSET_LONGS (__FD_SETSIZE/__NFDBITS) 29 | 30 | #undef __FDELT 31 | #define __FDELT(d) ((d) / __NFDBITS) 32 | 33 | #undef __FDMASK 34 | #define __FDMASK(d) (1UL << ((d) % __NFDBITS)) 35 | 36 | typedef struct { 37 | unsigned long fds_bits [__FDSET_LONGS]; 38 | } __kernel_fd_set; 39 | 40 | /* Type of a signal handler. */ 41 | typedef void (*__kernel_sighandler_t)(int); 42 | 43 | /* Type of a SYSV IPC key. */ 44 | typedef int __kernel_key_t; 45 | 46 | #include 47 | 48 | #endif /* _LINUX_POSIX_TYPES_H */ 49 | -------------------------------------------------------------------------------- /include/linux/stddef.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_STDDEF_H 2 | #define _LINUX_STDDEF_H 3 | 4 | #undef NULL 5 | #if defined(__cplusplus) 6 | #define NULL 0 7 | #else 8 | #define NULL ((void *)0) 9 | #endif 10 | 11 | #ifndef _SIZE_T 12 | #include 13 | #endif 14 | 15 | #undef offsetof 16 | #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /include/linux/unaligned/access_ok.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_UNALIGNED_ACCESS_OK_H 2 | #define _LINUX_UNALIGNED_ACCESS_OK_H 3 | 4 | #include 5 | 6 | static inline u16 get_unaligned_le16(const void *p) 7 | { 8 | return le16_to_cpup((__le16 *)p); 9 | } 10 | 11 | static inline u32 get_unaligned_le32(const void *p) 12 | { 13 | return le32_to_cpup((__le32 *)p); 14 | } 15 | 16 | static inline u64 get_unaligned_le64(const void *p) 17 | { 18 | return le64_to_cpup((__le64 *)p); 19 | } 20 | 21 | static inline u16 get_unaligned_be16(const void *p) 22 | { 23 | return be16_to_cpup((__be16 *)p); 24 | } 25 | 26 | static inline u32 get_unaligned_be32(const void *p) 27 | { 28 | return be32_to_cpup((__be32 *)p); 29 | } 30 | 31 | static inline u64 get_unaligned_be64(const void *p) 32 | { 33 | return be64_to_cpup((__be64 *)p); 34 | } 35 | 36 | static inline void put_unaligned_le16(u16 val, void *p) 37 | { 38 | *((__le16 *)p) = cpu_to_le16(val); 39 | } 40 | 41 | static inline void put_unaligned_le32(u32 val, void *p) 42 | { 43 | *((__le32 *)p) = cpu_to_le32(val); 44 | } 45 | 46 | static inline void put_unaligned_le64(u64 val, void *p) 47 | { 48 | *((__le64 *)p) = cpu_to_le64(val); 49 | } 50 | 51 | static inline void put_unaligned_be16(u16 val, void *p) 52 | { 53 | *((__be16 *)p) = cpu_to_be16(val); 54 | } 55 | 56 | static inline void put_unaligned_be32(u32 val, void *p) 57 | { 58 | *((__be32 *)p) = cpu_to_be32(val); 59 | } 60 | 61 | static inline void put_unaligned_be64(u64 val, void *p) 62 | { 63 | *((__be64 *)p) = cpu_to_be64(val); 64 | } 65 | 66 | #endif /* _LINUX_UNALIGNED_ACCESS_OK_H */ 67 | -------------------------------------------------------------------------------- /include/linux/unaligned/be_byteshift.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_UNALIGNED_BE_BYTESHIFT_H 2 | #define _LINUX_UNALIGNED_BE_BYTESHIFT_H 3 | 4 | #include 5 | 6 | static inline u16 __get_unaligned_be16(const u8 *p) 7 | { 8 | return p[0] << 8 | p[1]; 9 | } 10 | 11 | static inline u32 __get_unaligned_be32(const u8 *p) 12 | { 13 | return p[0] << 24 | p[1] << 16 | p[2] << 8 | p[3]; 14 | } 15 | 16 | static inline u64 __get_unaligned_be64(const u8 *p) 17 | { 18 | return (u64)__get_unaligned_be32(p) << 32 | 19 | __get_unaligned_be32(p + 4); 20 | } 21 | 22 | static inline void __put_unaligned_be16(u16 val, u8 *p) 23 | { 24 | *p++ = val >> 8; 25 | *p++ = val; 26 | } 27 | 28 | static inline void __put_unaligned_be32(u32 val, u8 *p) 29 | { 30 | __put_unaligned_be16(val >> 16, p); 31 | __put_unaligned_be16(val, p + 2); 32 | } 33 | 34 | static inline void __put_unaligned_be64(u64 val, u8 *p) 35 | { 36 | __put_unaligned_be32(val >> 32, p); 37 | __put_unaligned_be32(val, p + 4); 38 | } 39 | 40 | static inline u16 get_unaligned_be16(const void *p) 41 | { 42 | return __get_unaligned_be16((const u8 *)p); 43 | } 44 | 45 | static inline u32 get_unaligned_be32(const void *p) 46 | { 47 | return __get_unaligned_be32((const u8 *)p); 48 | } 49 | 50 | static inline u64 get_unaligned_be64(const void *p) 51 | { 52 | return __get_unaligned_be64((const u8 *)p); 53 | } 54 | 55 | static inline void put_unaligned_be16(u16 val, void *p) 56 | { 57 | __put_unaligned_be16(val, p); 58 | } 59 | 60 | static inline void put_unaligned_be32(u32 val, void *p) 61 | { 62 | __put_unaligned_be32(val, p); 63 | } 64 | 65 | static inline void put_unaligned_be64(u64 val, void *p) 66 | { 67 | __put_unaligned_be64(val, p); 68 | } 69 | 70 | #endif /* _LINUX_UNALIGNED_BE_BYTESHIFT_H */ 71 | -------------------------------------------------------------------------------- /include/linux/unaligned/le_byteshift.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_UNALIGNED_LE_BYTESHIFT_H 2 | #define _LINUX_UNALIGNED_LE_BYTESHIFT_H 3 | 4 | #include 5 | 6 | static inline u16 __get_unaligned_le16(const u8 *p) 7 | { 8 | return p[0] | p[1] << 8; 9 | } 10 | 11 | static inline u32 __get_unaligned_le32(const u8 *p) 12 | { 13 | return p[0] | p[1] << 8 | p[2] << 16 | p[3] << 24; 14 | } 15 | 16 | static inline u64 __get_unaligned_le64(const u8 *p) 17 | { 18 | return (u64)__get_unaligned_le32(p + 4) << 32 | 19 | __get_unaligned_le32(p); 20 | } 21 | 22 | static inline void __put_unaligned_le16(u16 val, u8 *p) 23 | { 24 | *p++ = val; 25 | *p++ = val >> 8; 26 | } 27 | 28 | static inline void __put_unaligned_le32(u32 val, u8 *p) 29 | { 30 | __put_unaligned_le16(val >> 16, p + 2); 31 | __put_unaligned_le16(val, p); 32 | } 33 | 34 | static inline void __put_unaligned_le64(u64 val, u8 *p) 35 | { 36 | __put_unaligned_le32(val >> 32, p + 4); 37 | __put_unaligned_le32(val, p); 38 | } 39 | 40 | static inline u16 get_unaligned_le16(const void *p) 41 | { 42 | return __get_unaligned_le16((const u8 *)p); 43 | } 44 | 45 | static inline u32 get_unaligned_le32(const void *p) 46 | { 47 | return __get_unaligned_le32((const u8 *)p); 48 | } 49 | 50 | static inline u64 get_unaligned_le64(const void *p) 51 | { 52 | return __get_unaligned_le64((const u8 *)p); 53 | } 54 | 55 | static inline void put_unaligned_le16(u16 val, void *p) 56 | { 57 | __put_unaligned_le16(val, p); 58 | } 59 | 60 | static inline void put_unaligned_le32(u32 val, void *p) 61 | { 62 | __put_unaligned_le32(val, p); 63 | } 64 | 65 | static inline void put_unaligned_le64(u64 val, void *p) 66 | { 67 | __put_unaligned_le64(val, p); 68 | } 69 | 70 | #endif /* _LINUX_UNALIGNED_LE_BYTESHIFT_H */ 71 | -------------------------------------------------------------------------------- /include/linux/usb/atmel_usba_udc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Platform data definitions for Atmel USBA gadget driver 3 | * [Original from Linux kernel: include/linux/usb/atmel_usba_udc.h] 4 | * 5 | * SPDX-License-Identifier: GPL-2.0+ 6 | */ 7 | #ifndef __LINUX_USB_USBA_H__ 8 | #define __LINUX_USB_USBA_H__ 9 | 10 | struct usba_ep_data { 11 | char *name; 12 | int index; 13 | int fifo_size; 14 | int nr_banks; 15 | int can_dma; 16 | int can_isoc; 17 | }; 18 | 19 | struct usba_platform_data { 20 | int num_ep; 21 | struct usba_ep_data *ep; 22 | }; 23 | 24 | extern int usba_udc_probe(struct usba_platform_data *pdata); 25 | 26 | #endif /* __LINUX_USB_USBA_H */ 27 | -------------------------------------------------------------------------------- /include/logbuff.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2002 3 | * Detlev Zundel, dzu@denx.de. 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | #ifndef _LOGBUFF_H 24 | #define _LOGBUFF_H 25 | 26 | #ifdef CONFIG_LOGBUFFER 27 | 28 | #define LOGBUFF_LEN (16384) /* Must be 16k right now */ 29 | #define LOGBUFF_MASK (LOGBUFF_LEN-1) 30 | #define LOGBUFF_OVERHEAD (4096) /* Logbuffer overhead for extra info */ 31 | #define LOGBUFF_RESERVE (LOGBUFF_LEN+LOGBUFF_OVERHEAD) 32 | 33 | #define LOGBUFF_INITIALIZED (1<<31) 34 | 35 | int drv_logbuff_init (void); 36 | void logbuff_init_ptrs (void); 37 | void logbuff_log(char *msg); 38 | void logbuff_reset (void); 39 | 40 | #endif /* CONFIG_LOGBUFFER */ 41 | 42 | #endif /* _LOGBUFF_H */ 43 | -------------------------------------------------------------------------------- /include/lzma/LzmaDec.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Fake include for LzmaDec.h 3 | * 4 | * Copyright (C) 2007-2009 Industrie Dial Face S.p.A. 5 | * Luigi 'Comio' Mantellini (luigi.mantellini@idf-hit.com) 6 | * 7 | * See file CREDITS for list of people who contributed to this 8 | * project. 9 | * 10 | * This program is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU General Public License as 12 | * published by the Free Software Foundation; either version 2 of 13 | * the License, or (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with this program; if not, write to the Free Software 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 23 | * MA 02111-1307 USA 24 | */ 25 | 26 | #ifndef __LZMADEC_H__FAKE__ 27 | #define __LZMADEC_H__FAKE__ 28 | 29 | #include "../../lib_generic/LzmaDec.h" 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /include/lzma/LzmaTools.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Fake include for LzmaTools.h 3 | * 4 | * Copyright (C) 2007-2009 Industrie Dial Face S.p.A. 5 | * Luigi 'Comio' Mantellini (luigi.mantellini@idf-hit.com) 6 | * 7 | * See file CREDITS for list of people who contributed to this 8 | * project. 9 | * 10 | * This program is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU General Public License as 12 | * published by the Free Software Foundation; either version 2 of 13 | * the License, or (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with this program; if not, write to the Free Software 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 23 | * MA 02111-1307 USA 24 | */ 25 | 26 | #ifndef __LZMATOOLS_H__FAKE__ 27 | #define __LZMATOOLS_H__FAKE__ 28 | 29 | #include "../../lib_generic/LzmaTools.h" 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /include/lzma/LzmaTypes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Fake include for Types.h 3 | * 4 | * Copyright (C) 2007-2009 Industrie Dial Face S.p.A. 5 | * Luigi 'Comio' Mantellini (luigi.mantellini@idf-hit.com) 6 | * 7 | * See file CREDITS for list of people who contributed to this 8 | * project. 9 | * 10 | * This program is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU General Public License as 12 | * published by the Free Software Foundation; either version 2 of 13 | * the License, or (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with this program; if not, write to the Free Software 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 23 | * MA 02111-1307 USA 24 | */ 25 | 26 | #ifndef __TYPES_H__FAKE__ 27 | #define __TYPES_H__FAKE__ 28 | 29 | /* 30 | *This avoids the collition with zlib.h Byte definition 31 | */ 32 | #define Byte LZByte 33 | 34 | #include "../../lib_generic/Types.h" 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /include/mk48t59.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2001 Sysgo Real-Time Solutions, GmbH 3 | * Andreas Heppel 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | 24 | /* 25 | * Date & Time support for the MK48T59 RTC 26 | */ 27 | 28 | 29 | #if defined(CONFIG_RTC_MK48T59) && (CONFIG_COMMANDS & CFG_CMD_DATE) 30 | 31 | #define RTC_PORT_ADDR0 CFG_ISA_IO + 0x70 32 | #define RTC_PORT_ADDR1 RTC_PORT_ADDR0 + 0x1 33 | #define RTC_PORT_DATA CFG_ISA_IO + 0x76 34 | 35 | /* RTC Offsets */ 36 | #define RTC_SECONDS 0x1FF9 37 | #define RTC_MINUTES 0x1FFA 38 | #define RTC_HOURS 0x1FFB 39 | #define RTC_DAY_OF_WEEK 0x1FFC 40 | #define RTC_DAY_OF_MONTH 0x1FFD 41 | #define RTC_MONTH 0x1FFE 42 | #define RTC_YEAR 0x1FFF 43 | 44 | #define RTC_CONTROLA 0x1FF8 45 | #define RTC_CA_WRITE 0x80 46 | #define RTC_CA_READ 0x40 47 | #define RTC_CA_CALIB_SIGN 0x20 48 | #define RTC_CA_CALIB_MASK 0x1f 49 | 50 | #define RTC_CONTROLB 0x1FF9 51 | #define RTC_CB_STOP 0x80 52 | 53 | #define RTC_WATCHDOG 0x1FF7 54 | #define RTC_WDS 0x80 55 | #define RTC_WD_RB_16TH 0x0 56 | #define RTC_WD_RB_4TH 0x1 57 | #define RTC_WD_RB_1 0x2 58 | #define RTC_WD_RB_4 0x3 59 | 60 | void rtc_set_watchdog(short multi, short res); 61 | void *nvram_read(void *dest, const short src, size_t count); 62 | void nvram_write(short dest, const void *src, size_t count); 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /include/nand_api.h: -------------------------------------------------------------------------------- 1 | #ifndef _NAND_API_H_ 2 | #define _NAND_SPI_H_ 3 | 4 | 5 | unsigned long ranand_init(void); 6 | int nand_env_init(void); 7 | 8 | int ranand_write(char *buf, unsigned int to, int len); 9 | int ranand_read(char *buf, unsigned int from, int len); 10 | int ranand_erase(unsigned int offs, int len); 11 | int ranand_erase_write(char *buf, unsigned int offs, int count); 12 | 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /include/rtc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2001 3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | 24 | /* 25 | * Generic RTC interface. 26 | */ 27 | #ifndef _RTC_H_ 28 | #define _RTC_H_ 29 | 30 | /* 31 | * The struct used to pass data from the generic interface code to 32 | * the hardware dependend low-level code ande vice versa. Identical 33 | * to struct rtc_time used by the Linux kernel. 34 | * 35 | * Note that there are small but significant differences to the 36 | * common "struct time": 37 | * 38 | * struct time: struct rtc_time: 39 | * tm_mon 0 ... 11 1 ... 12 40 | * tm_year years since 1900 years since 0 41 | */ 42 | 43 | struct rtc_time { 44 | int tm_sec; 45 | int tm_min; 46 | int tm_hour; 47 | int tm_mday; 48 | int tm_mon; 49 | int tm_year; 50 | int tm_wday; 51 | int tm_yday; 52 | int tm_isdst; 53 | }; 54 | 55 | void rtc_get (struct rtc_time *); 56 | void rtc_set (struct rtc_time *); 57 | void rtc_reset (void); 58 | 59 | void GregorianDay (struct rtc_time *); 60 | void to_tm (int, struct rtc_time *); 61 | unsigned long mktime (unsigned int, unsigned int, unsigned int, 62 | unsigned int, unsigned int, unsigned int); 63 | 64 | #endif /* _RTC_H_ */ 65 | -------------------------------------------------------------------------------- /include/serial.h: -------------------------------------------------------------------------------- 1 | #ifndef __SERIAL_H__ 2 | #define __SERIAL_H__ 3 | 4 | #define NAMESIZE 16 5 | #define CTLRSIZE 8 6 | 7 | struct serial_device { 8 | char name[NAMESIZE]; 9 | char ctlr[CTLRSIZE]; 10 | 11 | int (*init) (void); 12 | void (*setbrg) (void); 13 | int (*getc) (void); 14 | int (*tstc) (void); 15 | void (*putc) (const char c); 16 | void (*puts) (const char *s); 17 | 18 | struct serial_device *next; 19 | }; 20 | 21 | extern struct serial_device serial_smc_device; 22 | extern struct serial_device serial_scc_device; 23 | extern struct serial_device * default_serial_console (void); 24 | 25 | #if defined(CONFIG_405GP) || defined(CONFIG_405CR) || defined(CONFIG_440) \ 26 | || defined(CONFIG_405EP) 27 | extern struct serial_device serial0_device; 28 | extern struct serial_device serial1_device; 29 | #endif 30 | 31 | 32 | extern void serial_initialize(void); 33 | extern void serial_devices_init(void); 34 | extern int serial_assign(char * name); 35 | extern void serial_reinit_all(void); 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /include/spi_api.h: -------------------------------------------------------------------------------- 1 | #ifndef _SPI_API_H_ 2 | #define _SPI_SPI_H_ 3 | 4 | 5 | unsigned long raspi_init(void); 6 | int spi_env_init(void); 7 | 8 | int raspi_write(char *buf, unsigned int to, int len); 9 | int raspi_read(char *buf, unsigned int from, int len); 10 | int raspi_erase(unsigned int offs, int len); 11 | int raspi_erase_write(char *buf, unsigned int offs, int count); 12 | 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /include/systemace.h: -------------------------------------------------------------------------------- 1 | #ifndef __SYSTEMACE_H 2 | #define __SYSTEMACE_H 3 | /* 4 | * Copyright (c) 2004 Picture Elements, Inc. 5 | * Stephen Williams (steve@picturel.com) 6 | * 7 | * This source code is free software; you can redistribute it 8 | * and/or modify it in source code form under the terms of the GNU 9 | * General Public License as published by the Free Software 10 | * Foundation; either version 2 of the License, or (at your option) 11 | * any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 21 | */ 22 | #ident "$Id: //WIFI_SOC/MP/SDK_4_3_0_0/Uboot/include/systemace.h#1 $" 23 | 24 | #ifdef CONFIG_SYSTEMACE 25 | 26 | # include 27 | 28 | block_dev_desc_t * systemace_get_dev(int dev); 29 | 30 | #endif /* CONFIG_SYSTEMACE */ 31 | #endif /* __SYSTEMACE_H */ 32 | -------------------------------------------------------------------------------- /include/unxz.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Wrapper for XZ decompressor to make it usable for kernel and initramfs 3 | * decompression 4 | * 5 | * Author: Lasse Collin 6 | * 7 | * This file has been put into the public domain. 8 | * You can do whatever you want with this file. 9 | */ 10 | 11 | #ifndef DECOMPRESS_UNXZ_H 12 | #define DECOMPRESS_UNXZ_H 13 | 14 | int unxz(unsigned char *in, int in_size, unsigned char *out, int *in_used); 15 | 16 | #endif 17 | 18 | -------------------------------------------------------------------------------- /include/wps.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | > File Name: include/wps.h 3 | > Author: 4 | > Mail: 5 | > Created Time: 2015年04月11日 星期六 15时54分04秒 6 | ************************************************************************/ 7 | 8 | #ifndef _INCLUDE_WPS_H 9 | #define _INCLUDE_WPS_H 10 | void init_wps(void); 11 | int readwps(void);//按下输出0,未按下输出1 12 | #endif 13 | -------------------------------------------------------------------------------- /lib_generic/LzmaTools.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Usefuls routines based on the LzmaTest.c file from LZMA SDK 4.65 3 | * 4 | * Copyright (C) 2007-2008 Industrie Dial Face S.p.A. 5 | * Luigi 'Comio' Mantellini (luigi.mantellini@idf-hit.com) 6 | * 7 | * Copyright (C) 1999-2005 Igor Pavlov 8 | * 9 | * See file CREDITS for list of people who contributed to this 10 | * project. 11 | * 12 | * This program is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU General Public License as 14 | * published by the Free Software Foundation; either version 2 of 15 | * the License, or (at your option) any later version. 16 | * 17 | * This program is distributed in the hope that it will be useful, 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | * GNU General Public License for more details. 21 | * 22 | * You should have received a copy of the GNU General Public License 23 | * along with this program; if not, write to the Free Software 24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 25 | * MA 02111-1307 USA 26 | */ 27 | 28 | #ifndef __LZMA_TOOL_H__ 29 | #define __LZMA_TOOL_H__ 30 | 31 | #include 32 | 33 | extern int lzmaBuffToBuffDecompress (unsigned char *outStream, SizeT *uncompressedSize, 34 | unsigned char *inStream, SizeT length); 35 | #endif 36 | -------------------------------------------------------------------------------- /lib_generic/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # (C) Copyright 2000-2002 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | # 5 | # See file CREDITS for list of people who contributed to this 6 | # project. 7 | # 8 | # This program is free software; you can redistribute it and/or 9 | # modify it under the terms of the GNU General Public License as 10 | # published by the Free Software Foundation; either version 2 of 11 | # the License, or (at your option) any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program; if not, write to the Free Software 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | # MA 02111-1307 USA 22 | # 23 | 24 | include $(TOPDIR)/config.mk 25 | 26 | LIB = libgeneric.a 27 | 28 | OBJS = crc32.o ctype.o display_options.o string.o vsprintf.o 29 | 30 | ifeq ($(CONFIG_GZIP),ON) 31 | OBJS += zlib.o 32 | endif 33 | 34 | ifeq ($(CONFIG_BZIP2),ON) 35 | OBJS += bzlib.o bzlib_crctable.o bzlib_randtable.o bzlib_decompress.o bzlib_huffman.o 36 | endif 37 | 38 | ifeq ($(CONFIG_LZMA),ON) 39 | OBJS += LzmaDecode.o 40 | endif 41 | 42 | ifeq ($(CONFIG_XZ),ON) 43 | OBJS += decompress_unxz.o xz_dec_bcj.o xz_dec_lzma2.o xz_dec_stream.o 44 | endif 45 | 46 | $(LIB): .depend $(OBJS) 47 | $(AR) crv $@ $(OBJS) 48 | 49 | ######################################################################### 50 | 51 | .depend: Makefile $(OBJS:.o=.c) 52 | $(CC) -M $(CFLAGS) $(OBJS:.o=.c) > $@ 53 | 54 | sinclude .depend 55 | 56 | ######################################################################### 57 | -------------------------------------------------------------------------------- /lib_generic/display_options.c: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2000-2002 3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | 24 | #include 25 | 26 | int display_options (void) 27 | { 28 | extern char version_string[]; 29 | 30 | #if defined(BUILD_TAG) 31 | printf ("\n\n%s, Build: %s\n\n", version_string, BUILD_TAG); 32 | #else 33 | printf ("\n\n%s\n\n", version_string); 34 | #endif 35 | return 0; 36 | } 37 | 38 | /* 39 | * print sizes as "xxx kB", "xxx.y kB", "xxx MB" or "xxx.y MB" as needed; 40 | * allow for optional trailing string (like "\n") 41 | */ 42 | void print_size (ulong size, const char *s) 43 | { 44 | ulong m, n; 45 | ulong d = 1 << 20; /* 1 MB */ 46 | char c = 'M'; 47 | 48 | if (size < d) { /* print in kB */ 49 | c = 'k'; 50 | d = 1 << 10; 51 | } 52 | 53 | n = size / d; 54 | 55 | m = (10 * (size - (n * d)) + (d / 2) ) / d; 56 | 57 | if (m >= 10) { 58 | m -= 10; 59 | n += 1; 60 | } 61 | 62 | printf ("%2ld", n); 63 | if (m) { 64 | printf (".%ld", m); 65 | } 66 | printf (" %cB%s", c, s); 67 | } 68 | -------------------------------------------------------------------------------- /lib_generic/xz_stream.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Definitions for handling the .xz file format 3 | * 4 | * Author: Lasse Collin 5 | * 6 | * This file has been put into the public domain. 7 | * You can do whatever you want with this file. 8 | */ 9 | 10 | #ifndef XZ_STREAM_H 11 | #define XZ_STREAM_H 12 | 13 | /* 14 | * See the .xz file format specification at 15 | * http://tukaani.org/xz/xz-file-format.txt 16 | * to understand the container format. 17 | */ 18 | 19 | #define STREAM_HEADER_SIZE 12 20 | 21 | //#define HEADER_MAGIC "\3757zXZ" 22 | #define HEADER_MAGIC_SIZE 6 23 | 24 | #define FOOTER_MAGIC "YZ" 25 | #define FOOTER_MAGIC_SIZE 2 26 | 27 | /* 28 | * Variable-length integer can hold a 63-bit unsigned integer, or a special 29 | * value to indicate that the value is unknown. 30 | */ 31 | typedef uint64_t vli_type; 32 | 33 | #define VLI_MAX ((vli_type)-1 / 2) 34 | #define VLI_UNKNOWN ((vli_type)-1) 35 | 36 | /* Maximum encoded size of a VLI */ 37 | #define VLI_BYTES_MAX (sizeof(vli_type) * 8 / 7) 38 | 39 | /* Integrity Check types */ 40 | enum xz_check { 41 | XZ_CHECK_NONE = 0, 42 | XZ_CHECK_CRC32 = 1, 43 | XZ_CHECK_CRC64 = 4, 44 | XZ_CHECK_SHA256 = 10 45 | }; 46 | 47 | /* Maximum possible Check ID */ 48 | #define XZ_CHECK_MAX 15 49 | 50 | #endif 51 | 52 | -------------------------------------------------------------------------------- /lib_mips/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # (C) Copyright 2003 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | # 5 | # See file CREDITS for list of people who contributed to this 6 | # project. 7 | # 8 | # This program is free software; you can redistribute it and/or 9 | # modify it under the terms of the GNU General Public License as 10 | # published by the Free Software Foundation; either version 2 of 11 | # the License, or (at your option) any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program; if not, write to the Free Software 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | # MA 02111-1307 USA 22 | # 23 | 24 | include $(TOPDIR)/config.mk 25 | 26 | LIB = lib$(ARCH).a 27 | 28 | AOBJS = 29 | 30 | COBJS = board.o time.o mips_linux.o 31 | ifeq ($(MT7621_MP), y) 32 | COBJS += ashldi3.o ashrdi3.o lshrdi3.o 33 | ifeq ($(MT7621_FPGA_BOARD), y) 34 | COBJS += ddr_init.o 35 | endif 36 | endif 37 | 38 | OBJS = $(AOBJS) $(COBJS) 39 | 40 | $(LIB): .depend $(OBJS) 41 | $(AR) crv $@ $(OBJS) 42 | 43 | ######################################################################### 44 | 45 | .depend: Makefile $(AOBJS:.o=.S) $(COBJS:.o=.c) 46 | $(CC) -M $(CFLAGS) $(AOBJS:.o=.S) $(COBJS:.o=.c) > $@ 47 | 48 | sinclude .depend 49 | 50 | ######################################################################### 51 | -------------------------------------------------------------------------------- /lib_mips/ashldi3.c: -------------------------------------------------------------------------------- 1 | //#include 2 | 3 | #include "libgcc.h" 4 | 5 | long long __ashldi3(long long u, word_type b) 6 | { 7 | DWunion uu, w; 8 | word_type bm; 9 | 10 | if (b == 0) 11 | return u; 12 | 13 | uu.ll = u; 14 | bm = 32 - b; 15 | 16 | if (bm <= 0) { 17 | w.s.low = 0; 18 | w.s.high = (unsigned int) uu.s.low << -bm; 19 | } else { 20 | const unsigned int carries = (unsigned int) uu.s.low >> bm; 21 | 22 | w.s.low = (unsigned int) uu.s.low << b; 23 | w.s.high = ((unsigned int) uu.s.high << b) | carries; 24 | } 25 | 26 | return w.ll; 27 | } 28 | 29 | //EXPORT_SYMBOL(__ashldi3); 30 | -------------------------------------------------------------------------------- /lib_mips/ashrdi3.c: -------------------------------------------------------------------------------- 1 | //#include 2 | 3 | #include "libgcc.h" 4 | 5 | long long __ashrdi3(long long u, word_type b) 6 | { 7 | DWunion uu, w; 8 | word_type bm; 9 | 10 | if (b == 0) 11 | return u; 12 | 13 | uu.ll = u; 14 | bm = 32 - b; 15 | 16 | if (bm <= 0) { 17 | /* w.s.high = 1..1 or 0..0 */ 18 | w.s.high = 19 | uu.s.high >> 31; 20 | w.s.low = uu.s.high >> -bm; 21 | } else { 22 | const unsigned int carries = (unsigned int) uu.s.high << bm; 23 | 24 | w.s.high = uu.s.high >> b; 25 | w.s.low = ((unsigned int) uu.s.low >> b) | carries; 26 | } 27 | 28 | return w.ll; 29 | } 30 | 31 | //EXPORT_SYMBOL(__ashrdi3); 32 | -------------------------------------------------------------------------------- /lib_mips/libgcc.h: -------------------------------------------------------------------------------- 1 | #ifndef __ASM_LIBGCC_H 2 | #define __ASM_LIBGCC_H 3 | 4 | #include 5 | 6 | typedef int word_type __attribute__ ((mode (__word__))); 7 | 8 | #ifdef __BIG_ENDIAN 9 | struct DWstruct { 10 | int high, low; 11 | }; 12 | #elif defined(__LITTLE_ENDIAN) 13 | struct DWstruct { 14 | int low, high; 15 | }; 16 | #else 17 | #error I feel sick. 18 | #endif 19 | 20 | typedef union { 21 | struct DWstruct s; 22 | long long ll; 23 | } DWunion; 24 | 25 | #endif /* __ASM_LIBGCC_H */ 26 | -------------------------------------------------------------------------------- /lib_mips/lshrdi3.c: -------------------------------------------------------------------------------- 1 | //#include 2 | 3 | #include "libgcc.h" 4 | 5 | long long __lshrdi3(long long u, word_type b) 6 | { 7 | DWunion uu, w; 8 | word_type bm; 9 | 10 | if (b == 0) 11 | return u; 12 | 13 | uu.ll = u; 14 | bm = 32 - b; 15 | 16 | if (bm <= 0) { 17 | w.s.high = 0; 18 | w.s.low = (unsigned int) uu.s.high >> -bm; 19 | } else { 20 | const unsigned int carries = (unsigned int) uu.s.high << bm; 21 | 22 | w.s.high = (unsigned int) uu.s.high >> b; 23 | w.s.low = ((unsigned int) uu.s.low >> b) | carries; 24 | } 25 | 26 | return w.ll; 27 | } 28 | 29 | //EXPORT_SYMBOL(__lshrdi3); 30 | -------------------------------------------------------------------------------- /mips_config.mk: -------------------------------------------------------------------------------- 1 | # 2 | # (C) Copyright 2003 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | # 5 | # See file CREDITS for list of people who contributed to this 6 | # project. 7 | # 8 | # This program is free software; you can redistribute it and/or 9 | # modify it under the terms of the GNU General Public License as 10 | # published by the Free Software Foundation; either version 2 of 11 | # the License, or (at your option) any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program; if not, write to the Free Software 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | # MA 02111-1307 USA 22 | # 23 | 24 | PLATFORM_CPPFLAGS += -DCONFIG_MIPS -D__MIPS__ 25 | -------------------------------------------------------------------------------- /mkconfig: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | # Script to create header files and links to configure 4 | # U-Boot for a specific board. 5 | # 6 | # Parameters: Target Architecture CPU Board [VENDOR] [SOC] 7 | # 8 | # (C) 2002 DENX Software Engineering, Wolfgang Denk 9 | # 10 | 11 | APPEND=no # Default: Create new config file 12 | 13 | while [ $# -gt 0 ] ; do 14 | case "$1" in 15 | --) shift ; break ;; 16 | -a) shift ; APPEND=yes ;; 17 | *) break ;; 18 | esac 19 | done 20 | 21 | [ $# -lt 4 ] && exit 1 22 | [ $# -gt 6 ] && exit 1 23 | 24 | echo "Configuring for $1 board..." 25 | 26 | cd ./include 27 | 28 | # 29 | # Create link to architecture specific headers 30 | # 31 | rm -f asm 32 | ln -s asm-$2 asm 33 | rm -f asm-$2/arch 34 | ln -s arch-$3 asm-$2/arch 35 | 36 | if [ "$2" = "arm" ] ; then 37 | rm -f asm-$2/proc 38 | ln -s proc-armv asm-$2/proc 39 | fi 40 | 41 | # 42 | # Create include file for Make 43 | # 44 | echo "ARCH = $2" > config.mk 45 | echo "CPU = $3" >> config.mk 46 | echo "BOARD = $4" >> config.mk 47 | 48 | [ "$5" ] && [ "$5" != "NULL" ] && echo "VENDOR = $5" >> config.mk 49 | 50 | [ "$6" ] && [ "$6" != "NULL" ] && echo "SOC = $6" >> config.mk 51 | 52 | # 53 | # Create board specific header file 54 | # 55 | if [ "$APPEND" = "yes" ] # Append to existing config file 56 | then 57 | echo >> config.h 58 | else 59 | > config.h # Create new config file 60 | fi 61 | echo "/* Automatically generated - do not edit */" >>config.h 62 | echo "#include " >>config.h 63 | 64 | exit 0 65 | -------------------------------------------------------------------------------- /mt7621_ddr.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | VAR=$4 4 | DDR3=$(echo ${VAR##*DDR3}) 5 | 6 | if [ "$DDR3" == "$4" ]; then 7 | ddr_param_offset=200 8 | else 9 | ddr_param_offset=96 10 | fi 11 | 12 | LINE_NUM=$(cat ./$3|sed -n "/$4/=") 13 | LINE_NUM=$(echo $LINE_NUM + "1"|bc) 14 | 15 | if [ "$5" == "IN_NAND" ]; then 16 | offset=$ddr_param_offset 17 | sed -n "${LINE_NUM}p" ./$3|xxd -r -c 32|dd bs=1 count=32 seek=$offset of=$2 conv=notrunc 18 | offset=$(echo $offset + "32"|bc) 19 | LINE_NUM=$(echo $LINE_NUM + "1"|bc) 20 | sed -n "${LINE_NUM}p" ./$3|xxd -r -c 32|dd bs=1 count=32 seek=$offset of=$2 conv=notrunc 21 | offset=$(echo $offset + "32"|bc) 22 | LINE_NUM=$(echo $LINE_NUM + "1"|bc) 23 | sed -n "${LINE_NUM}p" ./$3|xxd -r -c 32|dd bs=1 count=32 seek=$offset of=$2 conv=notrunc 24 | else 25 | offset=$(echo "(($(stat -c %s uboot.bin)+$ddr_param_offset))" |bc) 26 | sed -n "${LINE_NUM}p" ./$3|xxd -r -c 32|dd bs=1 count=32 seek=$offset of=$2 conv=notrunc 27 | LINE_NUM=$(echo $LINE_NUM + "1"|bc) 28 | offset=$(echo $offset + "32"|bc) 29 | sed -n "${LINE_NUM}p" ./$3|xxd -r -c 32|dd bs=1 count=32 seek=$offset of=$2 conv=notrunc 30 | LINE_NUM=$(echo $LINE_NUM + "1"|bc) 31 | offset=$(echo $offset + "32"|bc) 32 | sed -n "${LINE_NUM}p" ./$3|xxd -r -c 32|dd bs=1 count=32 seek=$offset of=$2 conv=notrunc 33 | fi 34 | 35 | -------------------------------------------------------------------------------- /mt7621_stage_L2.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinney/MT7621-u-boot-mod/f546d5f423b00be6422703ef794b0526c9b74a4d/mt7621_stage_L2.bin -------------------------------------------------------------------------------- /mt7621_stage_sram.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinney/MT7621-u-boot-mod/f546d5f423b00be6422703ef794b0526c9b74a4d/mt7621_stage_sram.bin -------------------------------------------------------------------------------- /net/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # (C) Copyright 2000 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | # 5 | # See file CREDITS for list of people who contributed to this 6 | # project. 7 | # 8 | # This program is free software; you can redistribute it and/or 9 | # modify it under the terms of the GNU General Public License as 10 | # published by the Free Software Foundation; either version 2 of 11 | # the License, or (at your option) any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program; if not, write to the Free Software 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | # MA 02111-1307 USA 22 | # 23 | 24 | include $(TOPDIR)/config.mk 25 | 26 | # CFLAGS += -DET_DEBUG -DDEBUG 27 | 28 | LIB = libnet.a 29 | 30 | OBJS = net.o tftp.o eth.o httpd.o 31 | all: $(LIB) 32 | 33 | $(LIB): $(START) $(OBJS) 34 | $(AR) crv $@ $(OBJS) 35 | 36 | ######################################################################### 37 | 38 | .depend: Makefile $(OBJS:.o=.c) 39 | $(CC) -M $(CFLAGS) $(OBJS:.o=.c) > $@ 40 | 41 | sinclude .depend 42 | 43 | ######################################################################### 44 | -------------------------------------------------------------------------------- /net/httpd.h: -------------------------------------------------------------------------------- 1 | #ifndef _NET_HTTPD_H__ 2 | #define _NET_HTTPD_H__ 3 | 4 | void HttpdStart(void); 5 | void HttpdHandler(void); 6 | 7 | /* board specific implementation */ 8 | extern int do_http_upgrade(const ulong size, const int upgrade_type); 9 | extern int do_http_progress(const int state); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /net/rarp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2000 3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | 24 | 25 | #ifndef __RARP_H__ 26 | #define __RARP_H__ 27 | 28 | #ifndef __NET_H__ 29 | #include 30 | #endif /* __NET_H__ */ 31 | 32 | 33 | /**********************************************************************/ 34 | /* 35 | * Global functions and variables. 36 | */ 37 | 38 | extern int RarpTry; 39 | 40 | extern void RarpRequest (void); /* Send a RARP request */ 41 | 42 | /**********************************************************************/ 43 | 44 | #endif /* __RARP_H__ */ 45 | -------------------------------------------------------------------------------- /net/tftp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * LiMon - BOOTP/TFTP. 3 | * 4 | * Copyright 1994, 1995, 2000 Neil Russell. 5 | * (See License) 6 | */ 7 | 8 | #ifndef __TFTP_H__ 9 | #define __TFTP_H__ 10 | 11 | /**********************************************************************/ 12 | /* 13 | * Global functions and variables. 14 | */ 15 | 16 | /* tftp.c */ 17 | extern void TftpStart (void); /* Begin TFTP get */ 18 | 19 | /**********************************************************************/ 20 | 21 | #endif /* __TFTP_H__ */ 22 | -------------------------------------------------------------------------------- /peripheral/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for led stuff 3 | # 4 | 5 | include $(TOPDIR)/config.mk 6 | 7 | LIB = libperipheral.a 8 | OBJS += led.o 9 | OBJS += wps.o 10 | OBJS += oled.o 11 | 12 | all: $(LIB) 13 | $(LIB): $(START) $(OBJS) 14 | $(AR) crv $@ $(OBJS) 15 | 16 | ######################################################################### 17 | 18 | .depend: Makefile $(OBJS:.o=.c) 19 | $(CC) -M $(CFLAGS) $(OBJS:.o=.c) > $@ 20 | 21 | sinclude .depend 22 | 23 | ######################################################################### 24 | 25 | -------------------------------------------------------------------------------- /peripheral/led.c: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | > File Name: led.c 3 | > Author: 4 | > Mail: 5 | > Created Time: 2015年04月11日 星期六 15时22分19秒 6 | ************************************************************************/ 7 | #include 8 | 9 | #define POWERLEDADDR (*(volatile unsigned int *)0x1e000600)//GPIO#22 10 | #define SETPOWERLED (*(volatile unsigned int *)0x1e000630) 11 | #define GPIO_MODE_REG (*(volatile unsigned int *)0x1e000060) 12 | #define RGMII2_MODE_GPIO (1<<15) 13 | void init_power_led(void) 14 | { 15 | GPIO_MODE_REG |= RGMII2_MODE_GPIO; 16 | //GPIO_MODE_REG &=~RGMII2_MODE_GPIO; 17 | //GPIO#22 18 | POWERLEDADDR |=(1<<22);//设置为输出 19 | } 20 | void control_power_led(int flag)//写0熄灭 写1点亮 21 | { 22 | unsigned long tmp = 1<<22; 23 | if(flag == 1){ 24 | SETPOWERLED |= tmp; 25 | } 26 | else 27 | SETPOWERLED &= (~tmp); 28 | } 29 | 30 | 31 | -------------------------------------------------------------------------------- /peripheral/oled.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinney/MT7621-u-boot-mod/f546d5f423b00be6422703ef794b0526c9b74a4d/peripheral/oled.c -------------------------------------------------------------------------------- /peripheral/oledfont.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinney/MT7621-u-boot-mod/f546d5f423b00be6422703ef794b0526c9b74a4d/peripheral/oledfont.h -------------------------------------------------------------------------------- /peripheral/wps.c: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | > File Name: peripheral/wps.c 3 | > Author: 4 | > Mail: 5 | > Created Time: 2015年04月11日 星期六 15时52分12秒 6 | ************************************************************************/ 7 | 8 | #include 9 | #define WPSKEY (*(unsigned long*)0x1e000600) // GPIO#18 10 | #define WPSDATA (*(unsigned long *)0x1e000620) 11 | 12 | void init_wps(void) 13 | { 14 | WPSKEY &=(~(1<<18));//GPIO#18 15 | } 16 | int readwps(void)//按下输出0,未按下输出1 17 | { 18 | return (WPSDATA & (1<<18)); 19 | } 20 | 21 | -------------------------------------------------------------------------------- /rtc/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # (C) Copyright 2001-2004 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | # 5 | # See file CREDITS for list of people who contributed to this 6 | # project. 7 | # 8 | # This program is free software; you can redistribute it and/or 9 | # modify it under the terms of the GNU General Public License as 10 | # published by the Free Software Foundation; either version 2 of 11 | # the License, or (at your option) any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program; if not, write to the Free Software 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | # MA 02111-1307 USA 22 | # 23 | 24 | include $(TOPDIR)/config.mk 25 | 26 | #CFLAGS += -DDEBUG 27 | 28 | LIB = librtc.a 29 | 30 | OBJS = date.o 31 | 32 | all: $(LIB) 33 | 34 | $(LIB): $(START) $(OBJS) 35 | $(AR) crv $@ $(OBJS) 36 | 37 | ######################################################################### 38 | 39 | .depend: Makefile $(OBJS:.o=.c) 40 | $(CC) -M $(CFLAGS) $(OBJS:.o=.c) > $@ 41 | 42 | sinclude .depend 43 | 44 | ######################################################################### 45 | -------------------------------------------------------------------------------- /scripts/Makefile: -------------------------------------------------------------------------------- 1 | HEADER=header.tk 2 | TAIL=tail.tk 3 | 4 | # Previous versions always remade kconfig.tk because they always depended 5 | # on soundscript. This runs fairly fast, and I can't find all the 6 | # Config.in files to depend on anyways. So I'll force it to remake. 7 | 8 | kconfig.tk: dummy 9 | 10 | kconfig.tk: ${TOPDIR}/Makefile ${TOPDIR}/arch/${ARCH}/config.in \ 11 | tkparse ${HEADER} ${TAIL} 12 | @if [ -f /usr/local/bin/wish ]; then \ 13 | echo '#!'"/usr/local/bin/wish -f" > kconfig.tk; \ 14 | else \ 15 | echo '#!'"/usr/bin/wish -f" > kconfig.tk; \ 16 | fi 17 | cat ${HEADER} >> ./kconfig.tk 18 | ./tkparse < ../arch/${ARCH}/config.in >> kconfig.tk 19 | echo "set defaults \"arch/${ARCH}/defconfig\"" >> kconfig.tk 20 | echo "set ARCH \"${ARCH}\"" >> kconfig.tk 21 | cat ${TAIL} >> kconfig.tk 22 | chmod 755 kconfig.tk 23 | 24 | tkparse: tkparse.o tkcond.o tkgen.o 25 | ${HOSTCC} -o tkparse tkparse.o tkcond.o tkgen.o 26 | 27 | tkparse.o: tkparse.c tkparse.h 28 | 29 | tkcond.o: tkcond.c tkparse.h 30 | 31 | tkgen.o: tkgen.c tkparse.h 32 | 33 | tkparse.o tkcond.o tkgen.o: 34 | $(HOSTCC) $(HOSTCFLAGS) -c -o $@ $(@:.o=.c) 35 | 36 | clean: 37 | rm -f *~ kconfig.tk *.o tkparse 38 | 39 | # include $(TOPDIR)/Rules.make 40 | -------------------------------------------------------------------------------- /scripts/README.uClinux: -------------------------------------------------------------------------------- 1 | 2 | Yes, this is a rip off of the 2.4 linux script directory, it allows 3 | us to configure things even when we do not know the kernel version. 4 | We can also hack these guys without hurting the kernel config. 5 | 6 | -------------------------------------------------------------------------------- /scripts/lxdialog/BIG.FAT.WARNING: -------------------------------------------------------------------------------- 1 | This is NOT the official version of dialog. This version has been 2 | significantly modified from the original. It is for use by the Linux 3 | kernel configuration script. Please do not bother Savio Lam with 4 | questions about this program. 5 | -------------------------------------------------------------------------------- /scripts/lxdialog/Makefile: -------------------------------------------------------------------------------- 1 | HOSTCFLAGS += -DLOCALE 2 | LIBS = -lncurses 3 | 4 | ifeq (/usr/include/ncurses/ncurses.h, $(wildcard /usr/include/ncurses/ncurses.h)) 5 | HOSTCFLAGS += -I/usr/include/ncurses -DCURSES_LOC="" 6 | else 7 | ifeq (/usr/include/ncurses/curses.h, $(wildcard /usr/include/ncurses/curses.h)) 8 | HOSTCFLAGS += -I/usr/include/ncurses -DCURSES_LOC="" 9 | else 10 | ifeq (/usr/include/ncurses.h, $(wildcard /usr/include/ncurses.h)) 11 | HOSTCFLAGS += -DCURSES_LOC="" 12 | else 13 | HOSTCFLAGS += -DCURSES_LOC="" 14 | endif 15 | endif 16 | endif 17 | 18 | 19 | OBJS = checklist.o menubox.o textbox.o yesno.o inputbox.o \ 20 | util.o lxdialog.o msgbox.o 21 | 22 | %.o: %.c 23 | $(HOSTCC) $(HOSTCFLAGS) -c -o $@ $< 24 | 25 | all: ncurses lxdialog 26 | 27 | lxdialog: $(OBJS) 28 | $(HOSTCC) -o lxdialog $(OBJS) $(LIBS) 29 | 30 | ncurses: 31 | @echo "main() {}" > lxtemp.c 32 | @if $(HOSTCC) -lncurses lxtemp.c ; then \ 33 | rm -f lxtemp.c a.out; \ 34 | else \ 35 | rm -f lxtemp.c; \ 36 | echo -e "\007" ;\ 37 | echo ">> Unable to find the Ncurses libraries." ;\ 38 | echo ">>" ;\ 39 | echo ">> You must have Ncurses installed in order" ;\ 40 | echo ">> to use 'make menuconfig'" ;\ 41 | echo ;\ 42 | exit 1 ;\ 43 | fi 44 | 45 | clean: 46 | rm -f core *.o *~ lxdialog 47 | -------------------------------------------------------------------------------- /stage1/Makefile: -------------------------------------------------------------------------------- 1 | sinclude $(TOPDIR)/config.mk 2 | -include $(TOPDIR)/.config 3 | 4 | ifdef RT2880_FPGA_BOARD 5 | FADDR = 0xBC400000 6 | endif 7 | ifdef RT2880_ASIC_BOARD 8 | FADDR = 0xBC400000 9 | endif 10 | ifdef RT2883_FPGA_BOARD 11 | FADDR = 0xBC000000 12 | endif 13 | ifdef RT2883_ASIC_BOARD 14 | FADDR = 0xBC000000 15 | endif 16 | ifdef RT3052_ASIC_BOARD 17 | FADDR = 0xBFC00000 18 | endif 19 | ifdef RT3052_FPGA_BOARD 20 | FADDR = 0xBFC00000 21 | endif 22 | 23 | SRC := ./start.S ./boot.c ./nandc.c ./gdma.c 24 | OBJS = $(notdir $(addsuffix .o, $(basename $(SRC)))) 25 | CFLAGS += -DCONFIG_STAGE2_OFFSET=0x4000 26 | 27 | all: uboot.img 28 | 29 | stage2.bin: 30 | ../tools/mkimage -A $(ARCH) -T standalone -C none -a $(TEXT_BASE) \ 31 | -e $(shell readelf -h ../u-boot | grep "Entry" | awk '{print $$4}') \ 32 | -n "$(shell echo $(CFG_ENV_IS) | sed -e 's/IN_//') Flash Image" -d \ 33 | ../uboot.bin $@ 34 | 35 | stage2.o: stage2.bin 36 | echo 'char *stage1_ww="ww:' `date` `whoami` '";' | $(CC) $(CFLAGS) -c -o $@ -xc - 37 | $(OBJCOPY) --add-section .stage2=$< $@ 38 | $(OBJCOPY) --set-section-flags .stage2=code,contents,alloc,readonly $@ 39 | 40 | stage1n2.elf: $(OBJS) stage2.o 41 | $(LD) -T $(@:.elf=.lds) -Ttext $(FADDR) $^ -Map $(@:.elf=.map) -o $@ 42 | 43 | uboot.img: stage1n2.elf 44 | $(OBJCOPY) $(OBJCFLAGS) -O binary -v $< $@ 45 | @ls -al $@ 46 | dd if=$@ bs=4096 count=1 of=$@ seek=1 conv=notrunc 47 | dd if=$@ bs=4096 count=2 of=$@ seek=2 conv=notrunc 48 | @ls -al $@ 49 | @mv -f $@ ../$@ 50 | 51 | .PHONY: clean 52 | clean: 53 | rm -f $(OBJS) stage2.bin stage2.o stage1n2.elf stage1n2.map 54 | 55 | 56 | ######################################################################### 57 | 58 | .depend: Makefile $(SRC) 59 | $(CC) -M $(CFLAGS) $(SRC) > $@ 60 | 61 | sinclude .depend 62 | ######################################################################### 63 | 64 | -------------------------------------------------------------------------------- /stage1/boot.c: -------------------------------------------------------------------------------- 1 | #include "configs/rt2880.h" 2 | #include 3 | #include "rt_mmap.h" 4 | 5 | // register supported device 6 | void nor_init(void); 7 | void nand_init(void); 8 | void spi_init(void); 9 | 10 | int nor_read(uint32_t dst, uint32_t src_off, uint32_t size); 11 | int nand_read(uint32_t dst, uint32_t src_off, uint32_t size); 12 | int spi_read(uint32_t dst, uint32_t src_off, uint32_t size); 13 | 14 | 15 | void udelay(unsigned long usec) 16 | { 17 | #define MIPS_CPU_FREQ_US (320) 18 | volatile register unsigned long count = (usec * MIPS_CPU_FREQ_US); 19 | 20 | asm volatile (".set noreorder \n" 21 | "1: bnez %0, 1b \n\t" 22 | "addiu %0, -1 \n\t" 23 | : 24 | :"r"(count) 25 | ); 26 | } 27 | 28 | typedef enum nvram_device { 29 | NOR_FLASH = 1<<1, 30 | NAND_FLASH = 1<<2, 31 | SPI_FLASH = 1<<3, 32 | } nvram_t; 33 | 34 | 35 | inline nvram_t boot_from(void) 36 | { 37 | //fixme, read bootstrap configuration 38 | #if defined (CFG_ENV_IS_IN_FLASH) 39 | return NOR_FLASH; 40 | #elif defined (CFG_ENV_IS_IN_SPI) 41 | return SPI_FLASH; 42 | #elif defined (CFG_ENV_IS_IN_NAND) 43 | return NAND_FLASH; 44 | #else 45 | #error "FIXME, fail to simulate bootstrap setting of booting device" 46 | #endif 47 | } 48 | 49 | 50 | nvram_t ram = NOR_FLASH; 51 | 52 | typedef int (*NVRAM_READ_FUNC)(uint32_t , uint32_t , uint32_t); 53 | 54 | inline void nvram_init(NVRAM_READ_FUNC *nvram_read) 55 | { 56 | ram = boot_from(); 57 | 58 | if (ram == NOR_FLASH) { 59 | //nor_init(); 60 | *nvram_read = nor_read; 61 | } 62 | else if (ram == NAND_FLASH) { 63 | nand_init(); 64 | *nvram_read = nand_read; 65 | } 66 | else if (ram == SPI_FLASH) { 67 | spi_init(); 68 | *nvram_read = spi_read; 69 | } 70 | 71 | return; 72 | } 73 | 74 | int load_stage2(void) 75 | { 76 | image_header_t header[1]; 77 | NVRAM_READ_FUNC nvram_read; 78 | 79 | int (*stage2)(int, char **); 80 | 81 | // init flash controller by bootstrap setting 82 | nvram_init(&nvram_read); 83 | 84 | // read header of stage2 85 | nvram_read((uint32_t)header, CONFIG_STAGE2_OFFSET, sizeof(header)); 86 | 87 | // load stage2 image 88 | nvram_read(ntohl((uint32_t)header[0].ih_load), CONFIG_STAGE2_OFFSET + sizeof(header), ntohl(header[0].ih_size)); 89 | 90 | // ready_to_go 91 | stage2 = (int (*)(int, char **))ntohl(header[0].ih_ep); 92 | stage2(0, 0); 93 | 94 | return 0; 95 | } 96 | 97 | 98 | -------------------------------------------------------------------------------- /stage1/stage1n2.lds: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2003 3 | * Wolfgang Denk Engineering, 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | 24 | /* 25 | OUTPUT_FORMAT("elf32-bigmips", "elf32-bigmips", "elf32-bigmips") 26 | */ 27 | /*OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradbigmips")*/ 28 | OUTPUT_FORMAT("elf32-tradlittlemips", "elf32-tradbigmips", "elf32-tradlittlemips") 29 | OUTPUT_ARCH(mips) 30 | ENTRY(_start) 31 | 32 | SECTIONS 33 | { 34 | . = 0x00000000; 35 | 36 | . = ALIGN(4); 37 | .text : 38 | { 39 | start.o(.text) 40 | *(.text) 41 | } 42 | 43 | . = ALIGN(4); 44 | .rodata : { *(.rodata) } 45 | 46 | . = ALIGN(4); 47 | 48 | .except_vect : 49 | { 50 | *(.except_vect) 51 | } 52 | 53 | .data : { *(.data) } 54 | 55 | . = ALIGN(4); 56 | .sdata : { *(.sdata) } 57 | 58 | _gp = ALIGN(16); 59 | 60 | __got_start = .; 61 | .got : { *(.got) } 62 | __got_end = .; 63 | 64 | .sdata : { *(.sdata) } 65 | 66 | __u_boot_cmd_start = .; 67 | .u_boot_cmd : { *(.u_boot_cmd) } 68 | __u_boot_cmd_end = .; 69 | 70 | stage1_end_data = .; 71 | num_got_entries = (__got_end - __got_start) >> 2; 72 | 73 | . = ALIGN(4); 74 | .sbss : { *(.sbss) } 75 | .bss : { *(.bss) } 76 | 77 | stage1_end = .; 78 | 79 | _stage2_lma_s = LOADADDR(.text) + 0x4000; 80 | .stage2_image : AT (LOADADDR(.text) + 0x4000) 81 | { 82 | *(.stage2) 83 | } 84 | _stage2_lma_e = _stage2_lma_s + SIZEOF(.stage2_image); 85 | } 86 | 87 | 88 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /toolchain/buildroot-gcc342.tar.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinney/MT7621-u-boot-mod/f546d5f423b00be6422703ef794b0526c9b74a4d/toolchain/buildroot-gcc342.tar.bz2 -------------------------------------------------------------------------------- /toolchain/mips-2012.03.tar.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pinney/MT7621-u-boot-mod/f546d5f423b00be6422703ef794b0526c9b74a4d/toolchain/mips-2012.03.tar.bz2 -------------------------------------------------------------------------------- /tools/Makefile: -------------------------------------------------------------------------------- 1 | CFLAGS = -I./ -DUSE_HOSTCC 2 | 3 | all: mkimage 4 | 5 | clean: 6 | rm -f mkimage *.o 7 | 8 | .c.o: 9 | $(HOSTCC) $(CFLAGS) -c $^ 10 | 11 | .depend: 12 | 13 | mkimage: mkimage.o crc32.o crc.o 14 | $(HOSTCC) -o $@ $^ 15 | 16 | 17 | -------------------------------------------------------------------------------- /uboot_version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * w.x.y.z 4 | * w = significant change 5 | * x = major change (formal release) 6 | * y = minor change (bug fix release) 7 | * z = internal change (internal debuging) 8 | */ 9 | #define RALINK_LOCAL_VERSION "1.0" 10 | --------------------------------------------------------------------------------