oweals/u-boot_mod.git
8 years agoAdjust apu143.h config file for new PLL/clock and GPIO configuration code, minor...
Piotr Dymacz [Tue, 23 Feb 2016 08:57:49 +0000 (09:57 +0100)]
Adjust apu143.h config file for new PLL/clock and GPIO configuration code, minor changes for WR820

8 years agoAdjust db12x.h config file for new PLL/clock configuration code
Piotr Dymacz [Sun, 21 Feb 2016 13:18:40 +0000 (14:18 +0100)]
Adjust db12x.h config file for new PLL/clock configuration code

8 years agoAdjust ap121.h config file for new PLL/clock configuration code
Piotr Dymacz [Sun, 21 Feb 2016 11:43:43 +0000 (12:43 +0100)]
Adjust ap121.h config file for new PLL/clock configuration code

8 years agoRemove old and unused ar933x header file
Piotr Dymacz [Sun, 21 Feb 2016 11:40:15 +0000 (12:40 +0100)]
Remove old and unused ar933x header file

8 years agoAdd cmd_qcaclk to Makefile
Piotr Dymacz [Sun, 21 Feb 2016 09:45:04 +0000 (10:45 +0100)]
Add cmd_qcaclk to Makefile

8 years agoAdd new setclk/clearclk custom commands for QC/A
Piotr Dymacz [Sun, 21 Feb 2016 09:40:44 +0000 (10:40 +0100)]
Add new setclk/clearclk custom commands for QC/A

New code is universal, supports not only AR933x, but also
new QCA95xx and AR934x WiSoCs.

8 years agoIntroduce new low level init code for AR934x/QCA95xx and AR933x
Piotr Dymacz [Sun, 21 Feb 2016 09:29:34 +0000 (10:29 +0100)]
Introduce new low level init code for AR934x/QCA95xx and AR933x

New code is simpler, more universal and supports:
- clock configuration stored in FLASH
- non-fractional PLL/clocks configuration
- recovery mode (sets safe clocks when recovery button is pressed)

This was tested on many different QC/A WiSoCs and platforms,
including new QCA95xx chips.

Code for AR933x still needs some additional work. The original code
from Atheros SDK is very buggy and includes lot of (still) unknown
parts, like "pmu setup", "meas", etc. It seems that most of that
is related with radio configuration.

8 years agoRemove platform related code from start{_bootstrap}.S code, we will have it new low...
Piotr Dymacz [Sun, 21 Feb 2016 09:22:41 +0000 (10:22 +0100)]
Remove platform related code from start{_bootstrap}.S code, we will have it new low level init code

8 years agoDon't use dash in defines
Piotr Dymacz [Sun, 21 Feb 2016 09:18:09 +0000 (10:18 +0100)]
Don't use dash in defines

8 years agoRemove old code of setclk and clearclk custom commands
Piotr Dymacz [Sun, 21 Feb 2016 09:13:36 +0000 (10:13 +0100)]
Remove old code of setclk and clearclk custom commands

8 years agoAdd GPIO_FUNCTION_2 register defines, setup GPIO11/12 if needed in low level init...
Piotr Dymacz [Sun, 21 Feb 2016 01:30:33 +0000 (02:30 +0100)]
Add GPIO_FUNCTION_2 register defines, setup GPIO11/12 if needed in low level init code for AR933x

8 years agoFix CPU PLL dither register definitions; add some other needed defines in common...
Piotr Dymacz [Sat, 20 Feb 2016 01:17:26 +0000 (02:17 +0100)]
Fix CPU PLL dither register definitions; add some other needed defines in common QCA header file

8 years agoIntroduce new, low level GPIO initialization code
Piotr Dymacz [Fri, 19 Feb 2016 12:54:18 +0000 (13:54 +0100)]
Introduce new, low level GPIO initialization code

New code is universal and allows to predefine several config options:
- JTAG enable
- bitmasks for GPIOs set as inputs and outputs
- bitmasks for GPIO driven LEDs (active in low and hi)
- bitmasks for initial values on configured GPIOs
- LSUART GPIO lines

Code was tested on all supported WiSoCs: AR933x, AR934x and QCA95xx.

This commit removes also old GPIO related code and adds needed
bitmasks definitions in ap121 and db12x configs.

8 years agoFix AR933x GPIO related register bit fields in QC/A SOC common header file, add magic...
Piotr Dymacz [Thu, 18 Feb 2016 10:48:49 +0000 (11:48 +0100)]
Fix AR933x GPIO related register bit fields in QC/A SOC common header file, add magic value for 'PLL configuration inside FLASH' flag

8 years agoAdd some information about the author and clean up code in u-boot/common/command.c
Piotr Dymacz [Mon, 15 Feb 2016 13:13:57 +0000 (14:13 +0100)]
Add some information about the author and clean up code in u-boot/common/command.c

8 years agoAdd RTC related registers in QC/A SOC common header file
Piotr Dymacz [Sat, 13 Feb 2016 19:41:27 +0000 (20:41 +0100)]
Add RTC related registers in QC/A SOC common header file

8 years agoAdd original U-Boot images for two more AR9331 based devices
Piotr Dymacz [Thu, 11 Feb 2016 17:54:59 +0000 (18:54 +0100)]
Add original U-Boot images for two more AR9331 based devices

8 years agoFix wrong U-Boot bin images file permissions
Piotr Dymacz [Thu, 11 Feb 2016 17:01:49 +0000 (18:01 +0100)]
Fix wrong U-Boot bin images file permissions

8 years agoAdd original U-Boot images for two new GL-iNet devices: GL-AR150 and GL-AR300
Piotr Dymacz [Thu, 11 Feb 2016 16:59:32 +0000 (17:59 +0100)]
Add original U-Boot images for two new GL-iNet devices: GL-AR150 and GL-AR300

8 years agoAdd original U-Boot image for Wallys DR531
Piotr Dymacz [Thu, 11 Feb 2016 14:45:35 +0000 (15:45 +0100)]
Add original U-Boot image for Wallys DR531

8 years agoFix printing clock values lower than 100 MHz
Piotr Dymacz [Tue, 15 Dec 2015 13:17:34 +0000 (14:17 +0100)]
Fix printing clock values lower than 100 MHz

8 years agoAllow to define particular stop character for autoboot
Piotr Dymacz [Tue, 15 Dec 2015 11:45:53 +0000 (12:45 +0100)]
Allow to define particular stop character for autoboot

This would be useful for boards which share serial console with some
other device, like MCU, which may unintentionally interrupt boot process.

It is fast and simple solution, for future we should restore functionality
from original U-Boot code, with string stop sequences.

8 years agoAdd some missing field defines in SPI FLASH related register
Piotr Dymacz [Mon, 14 Dec 2015 12:07:50 +0000 (13:07 +0100)]
Add some missing field defines in SPI FLASH related register

8 years agoUse macros for bit fiels definition in QC/A common header file
Piotr Dymacz [Thu, 10 Dec 2015 14:48:12 +0000 (15:48 +0100)]
Use macros for bit fiels definition in QC/A common header file

8 years agoAllow to use bit mask in asm code
Piotr Dymacz [Thu, 10 Dec 2015 14:33:14 +0000 (15:33 +0100)]
Allow to use bit mask in asm code

8 years agoFix wrong DPLL2 in SRIF area register definitions for QCA953x
Piotr Dymacz [Thu, 10 Dec 2015 13:54:52 +0000 (14:54 +0100)]
Fix wrong DPLL2 in SRIF area register definitions for QCA953x

As usual... you should not trust QC/A datasheets!
They are so buggy and contain lot of copy&paste mistakes.

DPLL2 register in SRIF for QCA953x seems to be totally different
than in other QCA95xx WiSOCs. Happily, definitions in original code
from SDK seem to be correct, so we will use it instead.

Clock settings based on setting default and SRIF PLL was confirmed on scope.

8 years agoUpdate default SPI divider value for QCA953x
Piotr Dymacz [Thu, 3 Dec 2015 08:05:44 +0000 (09:05 +0100)]
Update default SPI divider value for QCA953x

8 years agoInclude new FLASH common code file also in ap143 Makefile
Piotr Dymacz [Wed, 2 Dec 2015 23:56:53 +0000 (00:56 +0100)]
Include new FLASH common code file also in ap143 Makefile

8 years agoFix SPI clock calculation in setclk command, use new QC/A clocks calculation function
Piotr Dymacz [Wed, 2 Dec 2015 18:30:07 +0000 (19:30 +0100)]
Fix SPI clock calculation in setclk command, use new QC/A clocks calculation function

8 years agoInclude new FLASH common code file in Makefiles
Piotr Dymacz [Wed, 2 Dec 2015 18:24:56 +0000 (19:24 +0100)]
Include new FLASH common code file in Makefiles

8 years agoUpdate printing FLASH info in common code, allow to print info about more FLASH banks
Piotr Dymacz [Wed, 2 Dec 2015 18:14:58 +0000 (19:14 +0100)]
Update printing FLASH info in common code, allow to print info about more FLASH banks

8 years agoAdd new file with FLASH related common code for all QCA boards
Piotr Dymacz [Wed, 2 Dec 2015 18:08:27 +0000 (19:08 +0100)]
Add new file with FLASH related common code for all QCA boards

8 years agoInclude new QC/A SPI FLASH driver in Makefile
Piotr Dymacz [Wed, 2 Dec 2015 17:57:42 +0000 (18:57 +0100)]
Include new QC/A SPI FLASH driver in Makefile

8 years agoRemove from cmd_custom.c include of already removed header file
Piotr Dymacz [Wed, 2 Dec 2015 16:27:17 +0000 (17:27 +0100)]
Remove from cmd_custom.c include of already removed header file

8 years agoRefactor FLASH related code
Piotr Dymacz [Wed, 2 Dec 2015 16:23:15 +0000 (17:23 +0100)]
Refactor FLASH related code

Add more information fields in FLASH description structure, add list of supported chips,
move some defines related with SPI NOR FLASH to flash.h, clean and reformat code.

8 years agoRemove old, flash related code from Atheros
Piotr Dymacz [Wed, 2 Dec 2015 16:11:14 +0000 (17:11 +0100)]
Remove old, flash related code from Atheros

8 years agoAdd SFDP support in new QC/A SPI driver
Piotr Dymacz [Wed, 2 Dec 2015 01:07:46 +0000 (02:07 +0100)]
Add SFDP support in new QC/A SPI driver

SFDP (serial FLASH discoverable parameters) allows to get useful information
about FLASH parameters and we will use it for unknown chip, to get basic data
like size, erase sector size and corresponding erase command.

Plus, some other minor changes:
- remove defines (we will keep it in flash.h)
- use provided sector erase command

9 years agoRemove infinite loop from new QC/A SPI driver
Piotr Dymacz [Tue, 24 Nov 2015 12:38:35 +0000 (13:38 +0100)]
Remove infinite loop from new QC/A SPI driver

It seems that we really don't need and don't want this loop here.
In case of missing FLASH chip, we should get 0x0 from SPI shift in register after the command, because other chips are silent during their CS high.

What's more, it seems that the access to SPI shift in register is somehow locked until the SOC shifts out all previously programmed bits.
That is only a theory after some tests on scope and still needs more tests.

9 years agoAdd missing copyright/license info
Piotr Dymacz [Mon, 23 Nov 2015 17:35:58 +0000 (18:35 +0100)]
Add missing copyright/license info

9 years agoAdd initial version of new QC/A SPI FLASH driver
Piotr Dymacz [Sun, 22 Nov 2015 21:51:58 +0000 (22:51 +0100)]
Add initial version of new QC/A SPI FLASH driver

Instead of using so called bit banging/blasting mode, as the old one driver from Atheros SDK does, this driver utilizes SPI shift registers.
With this approach, we need to only setup one register and let the built-in SPI controller do the rest.

SPI shift registers and how they work exactly are not described very well in QC/A WiSoCs datasheets, so som things had to be tested in practice.

This driver has been already successfully tested on all supported platforms, including:
- Atheros AR933x (SPI shift registers are not mentioned in its datasheet!)
- Atheros AR9341/4
- Qualcomm Atheros QCA953x

Tests on scope showed that with this driver, clock for SPI is the same as the one set in SPI_CONTROL register (depends on platform, between 25 and 30 MHz).
With old driver, clock was around 4-6 MHz, which means that new driver may drastically increase SPI operations speed.

In practical tests, for operations like sector erase, time needed by chip to finish the operation, is more significant, so there is no difference at all.
Comparison for other operations, like page program, has not been done yet.

9 years agoWIP: clean little bit ap143.h
Piotr Dymacz [Mon, 16 Nov 2015 11:46:31 +0000 (12:46 +0100)]
WIP: clean little bit ap143.h

9 years agoAdd support for LED and button in TL-WR820N
Piotr Dymacz [Mon, 16 Nov 2015 11:16:40 +0000 (12:16 +0100)]
Add support for LED and button in TL-WR820N

9 years agoDrop executable file attrib for original U-Boot images
Piotr Dymacz [Mon, 16 Nov 2015 11:06:06 +0000 (12:06 +0100)]
Drop executable file attrib for original U-Boot images

9 years agoAdd original U-Boot image for TP-Link TL-WR820N v1 for China market
Piotr Dymacz [Mon, 16 Nov 2015 11:01:42 +0000 (12:01 +0100)]
Add original U-Boot image for TP-Link TL-WR820N v1 for China market

9 years agoUpdate .gitignore: track original u-boot images
Piotr Dymacz [Mon, 16 Nov 2015 11:00:47 +0000 (12:00 +0100)]
Update .gitignore: track original u-boot images

9 years agoInclude all files from TP-Link GPL sources needed to make TL-WR820N based on QCA953x...
Piotr Dymacz [Mon, 16 Nov 2015 02:15:39 +0000 (03:15 +0100)]
Include all files from TP-Link GPL sources needed to make TL-WR820N based on QCA953x compile and work... we will clean this mess later

9 years agoAdd initial definition for TL-WR820N CH in U-Boot Makefile
Piotr Dymacz [Mon, 16 Nov 2015 02:14:18 +0000 (03:14 +0100)]
Add initial definition for TL-WR820N CH in U-Boot Makefile

9 years agoRemove not used anymore config CONFIG_HORNET_1_1_WAR
Piotr Dymacz [Mon, 16 Nov 2015 02:11:57 +0000 (03:11 +0100)]
Remove not used anymore config CONFIG_HORNET_1_1_WAR

9 years agoRemove old configs CONFIG_AR7240 and CONFIG_AR7100
Piotr Dymacz [Mon, 16 Nov 2015 02:10:56 +0000 (03:10 +0100)]
Remove old configs CONFIG_AR7240 and CONFIG_AR7100

9 years agoAdd TL-WR820N CH definition in top level Makefile
Piotr Dymacz [Mon, 16 Nov 2015 01:52:17 +0000 (02:52 +0100)]
Add TL-WR820N CH definition in top level Makefile

9 years agoRework start(_bootstrap).S files
Piotr Dymacz [Mon, 16 Nov 2015 01:49:20 +0000 (02:49 +0100)]
Rework start(_bootstrap).S files

9 years agoMore cleans, this time with AR934x low level related code and forgotten changes in...
Piotr Dymacz [Mon, 16 Nov 2015 01:16:51 +0000 (02:16 +0100)]
More cleans, this time with AR934x low level related code and forgotten changes in Makefile for AR933x low level code

9 years agoClean mess with AR933x low level related code
Piotr Dymacz [Mon, 16 Nov 2015 01:08:18 +0000 (02:08 +0100)]
Clean mess with AR933x low level related code

9 years agoAdd qca_gpio_init.S file with lowlevel initialization of GPIO, for platforms based...
Piotr Dymacz [Mon, 16 Nov 2015 00:03:21 +0000 (01:03 +0100)]
Add qca_gpio_init.S file with lowlevel initialization of GPIO, for platforms based on QC/A SOCs

9 years agoAdd GPIO MUX related definitions in qca_soc_common.h header file, plus some minor...
Piotr Dymacz [Sun, 15 Nov 2015 23:14:49 +0000 (00:14 +0100)]
Add GPIO MUX related definitions in qca_soc_common.h header file, plus some minor fixes

9 years agoAdjust QC/A SOC related code to the new bitmask SOC_TYPE values
Piotr Dymacz [Sun, 15 Nov 2015 23:13:28 +0000 (00:13 +0100)]
Adjust QC/A SOC related code to the new bitmask SOC_TYPE values

9 years agoDon't include linux/bitops.h header in ASM code
Piotr Dymacz [Sun, 15 Nov 2015 23:11:24 +0000 (00:11 +0100)]
Don't include linux/bitops.h header in ASM code

9 years agoFix wrong bitwise operators used for SOC_TYPE defines
Piotr Dymacz [Sun, 15 Nov 2015 16:07:00 +0000 (17:07 +0100)]
Fix wrong bitwise operators used for SOC_TYPE defines

9 years agoUse new bitmask for SOC_TYPE in QC/A common registers definition header
Piotr Dymacz [Sun, 15 Nov 2015 14:12:11 +0000 (15:12 +0100)]
Use new bitmask for SOC_TYPE in QC/A common registers definition header

9 years agoUse bitmasks for SOC types and SOC families selection
Piotr Dymacz [Sun, 15 Nov 2015 14:02:26 +0000 (15:02 +0100)]
Use bitmasks for SOC types and SOC families selection

That will allow us to not only select specific SOC,
like QCA9558, but also the family, ex. QCA955x

9 years agoRework code related with CPU reset, plus minor fixes
Piotr Dymacz [Sat, 14 Nov 2015 20:43:00 +0000 (21:43 +0100)]
Rework code related with CPU reset, plus minor fixes

9 years agoAdd bit fields definitions for RST_RESET register in QC/A common register definition...
Piotr Dymacz [Sat, 14 Nov 2015 19:18:15 +0000 (20:18 +0100)]
Add bit fields definitions for RST_RESET register in QC/A common register definition header, plus some minor fixes

9 years agoFix definitions for QCA953x revisions
Piotr Dymacz [Sat, 14 Nov 2015 01:15:33 +0000 (02:15 +0100)]
Fix definitions for QCA953x revisions

9 years agoAdd support for reading MIPS CPU type and print it during booting
Piotr Dymacz [Sat, 14 Nov 2015 14:25:56 +0000 (15:25 +0100)]
Add support for reading MIPS CPU type and print it during booting

9 years agoRemove old serial and clock drivers, we don't need them anymore
Piotr Dymacz [Fri, 13 Nov 2015 02:07:23 +0000 (03:07 +0100)]
Remove old serial and clock drivers, we don't need them anymore

9 years agoAdjust code in ar7240_flash.c to work after last changes
Piotr Dymacz [Fri, 13 Nov 2015 02:04:40 +0000 (03:04 +0100)]
Adjust code in ar7240_flash.c to work after last changes

It's really ugly and need to be rewritten soon... for now, keep it as it is

9 years agoSome code cleans and formatting fixes
Piotr Dymacz [Fri, 13 Nov 2015 02:01:44 +0000 (03:01 +0100)]
Some code cleans and formatting fixes

Includes:
- cleaning in ap121.c and db12x.c (remove unused code, formatting)
- get rid of board related stuff in board.c, formating, minor changes
- formating and minor changes in bootstrap_board.c
- add some missing functions definitions in common.h header

9 years agoStart using new QC/A related code plus minor fixes in ag7240.c and ag934x.c
Piotr Dymacz [Fri, 13 Nov 2015 01:58:21 +0000 (02:58 +0100)]
Start using new QC/A related code plus minor fixes in ag7240.c and ag934x.c

9 years agoAdd forgotten define name change in soc_common.h
Piotr Dymacz [Fri, 13 Nov 2015 01:56:12 +0000 (02:56 +0100)]
Add forgotten define name change in soc_common.h

9 years agoNew, common file for board related, common functions
Piotr Dymacz [Fri, 13 Nov 2015 01:50:40 +0000 (02:50 +0100)]
New, common file for board related, common functions

9 years agoAdd new code/drivers for QC/A WiSoCs
Piotr Dymacz [Fri, 13 Nov 2015 01:17:48 +0000 (02:17 +0100)]
Add new code/drivers for QC/A WiSoCs

New, more universal and clean code for:
- High Speed UART (old AR933x UART driver)
- Low Speed UART (for AR934x and QCA95xx)
- system clocks calculation
- SOC version and revision

Work still in progress (some TODO left in code)

9 years agoIntroduce new header files for SoC register defines
Piotr Dymacz [Thu, 12 Nov 2015 21:56:23 +0000 (22:56 +0100)]
Introduce new header files for SoC register defines

As it turned out, most of QC/A WiSoC are very similar
from register structures and addresses point of view.

What's more, it seems that even when some registers
or fields are slightly different in name, they still
mean the same and work in exactly same way.

So, instead of using approach from old Atheros SDK,
where we have hundreds of different header files,
for different chips, we will use only one. And in
case of different address for the same register or
different fields size/position, etc., we will use
preprocessor and SOC_TYPE value.

Add also MediaTek/Ralink headers file, we are going
to fill it soon.

9 years agoAnother helper macro moved to include/linux/bitops.h
Piotr Dymacz [Wed, 11 Nov 2015 23:04:32 +0000 (00:04 +0100)]
Another helper macro moved to include/linux/bitops.h

9 years agoExport new SOC_TYPE defines into include/config.h, we are going to use that with...
Piotr Dymacz [Wed, 11 Nov 2015 23:00:36 +0000 (00:00 +0100)]
Export new SOC_TYPE defines into include/config.h, we are going to use that with new QC/A related code

9 years agoAdd git short hash in U-Boot version string
Piotr Dymacz [Wed, 11 Nov 2015 22:54:57 +0000 (23:54 +0100)]
Add git short hash in U-Boot version string

9 years agoAdd BIT/S() macro helpers in u-boot/include/linux/bitops.h
Piotr Dymacz [Mon, 9 Nov 2015 13:41:48 +0000 (14:41 +0100)]
Add BIT/S() macro helpers in u-boot/include/linux/bitops.h

9 years agoChange BOARD_CUSTOM_STRING for all supported devices, we will use it as board name...
Piotr Dymacz [Sun, 8 Nov 2015 19:37:34 +0000 (20:37 +0100)]
Change BOARD_CUSTOM_STRING for all supported devices, we will use it as board name in future

9 years agoMerge branch 'pull_request_82'
Piotr Dymacz [Thu, 5 Nov 2015 20:29:42 +0000 (21:29 +0100)]
Merge branch 'pull_request_82'

9 years agoCosmetic fix
Piotr Dymacz [Thu, 5 Nov 2015 20:27:44 +0000 (21:27 +0100)]
Cosmetic fix

9 years agoMerge branch 'pull_request_79'
Piotr Dymacz [Thu, 5 Nov 2015 19:45:49 +0000 (20:45 +0100)]
Merge branch 'pull_request_79'

9 years agoUse longer name for Black Swift board defines, BSB doesn't say too much
Piotr Dymacz [Thu, 5 Nov 2015 19:45:39 +0000 (20:45 +0100)]
Use longer name for Black Swift board defines, BSB doesn't say too much

9 years agoMerge branch 'pull_request_67'
Piotr Dymacz [Thu, 5 Nov 2015 19:20:16 +0000 (20:20 +0100)]
Merge branch 'pull_request_67'

9 years agoUpdate both README files: add shorter and tested instruction for update in DD-WRT
Piotr Dymacz [Thu, 5 Nov 2015 17:41:46 +0000 (18:41 +0100)]
Update both README files: add shorter and tested instruction for update in DD-WRT

9 years agoUpdate both README files: add description for OpenWrt update method, using dedicated...
Piotr Dymacz [Thu, 5 Nov 2015 15:00:52 +0000 (16:00 +0100)]
Update both README files: add description for OpenWrt update method, using dedicated images from official releases

9 years agoMerge branch 'update_readme'
Piotr Dymacz [Thu, 5 Nov 2015 12:52:17 +0000 (13:52 +0100)]
Merge branch 'update_readme'

9 years agoUpdate both README files, add information about different FLASH map, update instructi...
Piotr Dymacz [Thu, 5 Nov 2015 12:46:01 +0000 (13:46 +0100)]
Update both README files, add information about different FLASH map, update instruction for TFTP/UART method, add new images

9 years agoFix warning in tinf.h: function declaration isn't a prototype 82/head
Tobias Diedrich [Wed, 21 Oct 2015 20:05:26 +0000 (22:05 +0200)]
Fix warning in tinf.h: function declaration isn't a prototype

9 years agoReplace crc32 with tinf_crc32 everywhere.
Tobias Diedrich [Wed, 21 Oct 2015 20:03:35 +0000 (22:03 +0200)]
Replace crc32 with tinf_crc32 everywhere.

9 years agoMake compressed image compile again.
Tobias Diedrich [Wed, 21 Oct 2015 19:37:42 +0000 (21:37 +0200)]
Make compressed image compile again.

9 years agoAllow overriding CROSS_COMPILE on the commandline.
Tobias Diedrich [Wed, 21 Oct 2015 19:33:36 +0000 (21:33 +0200)]
Allow overriding CROSS_COMPILE on the commandline.

9 years agoRemove local modifications from tinfgzip.c that were included accidentally.
Tobias Diedrich [Tue, 20 Oct 2015 22:39:49 +0000 (00:39 +0200)]
Remove local modifications from tinfgzip.c that were included accidentally.

9 years agoAvoid "implicit declaration of function 'tinf_crc32'"
Tobias Diedrich [Tue, 20 Oct 2015 22:30:29 +0000 (00:30 +0200)]
Avoid "implicit declaration of function 'tinf_crc32'"

9 years agoDrop in tinflate lib.
Tobias Diedrich [Tue, 20 Oct 2015 22:20:35 +0000 (00:20 +0200)]
Drop in tinflate lib.

Adds compatibility-macro for crc32.
Setting first arg (crc) to anything but 0 is not supported, but all
callers already conform to this.
This is asserted at compile time through macro trickery.

Reduces uncompressed code size by ~1KB:
Without this change: Data Size: 127348 Bytes = 124.36 kB = 0.12 MB
After this change: Data Size: 126084 Bytes = 123.13 kB = 0.12 MB

9 years agoRemvove unused zlib.h and bzlib.h
Tobias Diedrich [Tue, 20 Oct 2015 21:50:00 +0000 (23:50 +0200)]
Remvove unused zlib.h and bzlib.h

9 years agoMove milisecdelay into include/common.h
Tobias Diedrich [Mon, 19 Oct 2015 20:40:41 +0000 (22:40 +0200)]
Move milisecdelay into include/common.h

9 years agoDo not set -DCOMPRESSED_UBOOT=0
Tobias Diedrich [Mon, 19 Oct 2015 17:46:22 +0000 (19:46 +0200)]
Do not set -DCOMPRESSED_UBOOT=0

The code only checks for existance, so -DCOMPRESSED_UBOOT=0
leads to "#ifdef COMPRESSED_UBOOT" protected sections to be wrongly
included.

9 years agoFix memory initialization in ag7240.c
Tobias Diedrich [Mon, 19 Oct 2015 17:36:59 +0000 (19:36 +0200)]
Fix memory initialization in ag7240.c

Only the first sizeof(ptr) bytes were initialized correctly.
This leads to a crash in ag7250_send() if mac->next_tx is uninitialized
(if the memory returned by malloc() is not nulled).

9 years agoLog a message when sbrk fails and return the correct error code.
Tobias Diedrich [Mon, 19 Oct 2015 17:32:12 +0000 (19:32 +0200)]
Log a message when sbrk fails and return the correct error code.

Returning NULL leads to subtle corruption and malloc returning memory
addresses in the user mode space range (0x00000000-0x7fffffff).

This in turn also breaks everything that implicitly relies on malloc()ed
memory to be zeroed at the beginning (since the malloc arena is
initially zeroed).

9 years agoREADME*: add Black Swift board info 79/head
Antony Pavlov [Sat, 26 Sep 2015 19:59:28 +0000 (22:59 +0300)]
README*: add Black Swift board info

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
9 years agoadd Black Swift board support
Dmitriy Zherebkov [Sat, 26 Sep 2015 19:51:04 +0000 (22:51 +0300)]
add Black Swift board support

Black Swift is a tiny coin-sized embedded computer based on AR9331 SoC.
See http://www.black-swift.com/ for details.

See also Black Swift kickstarter page:
    https://www.kickstarter.com/projects/1133560316/black-swift-tiny-wireless-computer

Signed-off-by: Dmitriy Zherebkov <dzh@black-swift.com>
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>