view target-utils/lunadrv/main.c @ 992:c4c400c1b10c

fc-loadtool flash: no flash2 ppb-erase-all All PPBs from across the entire flash chip can only be erased together as a unit, spanning across both banks on 16 MiB chips - therefore, we shall disallow 'flash2 ppb-erase-all', and accept 'flash ppb-erase-all' only.
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 03 Dec 2023 04:47:31 +0000
parents db9a8e88e63f
children
line wrap: on
line source

#include "types.h"

main()
{
	uart_select_init();
	printf("Luna LCD driver utility running\n");
	print_boot_rom_info();
	/* Calypso MEMIF setup */
	*(volatile u16 *)0xfffffb00 = 0x00A4;
	*(volatile u16 *)0xfffffb02 = 0x00A4;
	*(volatile u16 *)0xfffffb04 = 0x00A4;
	*(volatile u16 *)0xfffffb06 = 0x02A5;
	*(volatile u16 *)0xfffef006 = 0x0008;
	/* GPIO setup for backlight control */
	*(volatile u16 *)0xfffef00a = 0x01E0;
	*(volatile u16 *)0xfffe4802 = 0x0200;
	*(volatile u16 *)0xfffe4804 = 0xFDFF;
	for (;;) {
		putchar('=');
		if (command_entry())
			command_dispatch();
	}
}