From 07138ba2ba08ce586486baab081aa455eb021fea Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Sat, 19 May 2012 13:33:45 +0200 Subject: imx233: move the freescale partition handling to its own file The freescale firmware partitions has a lots of quirks that need to be dealt with, so do it the proper way. Change-Id: I8a5bd3fb462a4df143bc6c931057f3ffedd4b3d3 --- bootloader/imx233.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'bootloader') diff --git a/bootloader/imx233.c b/bootloader/imx233.c index 6d356b9..c1ab489 100644 --- a/bootloader/imx233.c +++ b/bootloader/imx233.c @@ -40,6 +40,8 @@ #include "fmradio_i2c.h" #include "version.h" #include "powermgmt.h" +#include "partitions-imx233.h" +#include "adc-imx233.h" #include "usb.h" @@ -84,6 +86,7 @@ static void usb_mode(int connect_timeout) printf("Bootloader USB mode"); /* Enable power management to charge */ powermgmt_init(); + adc_init(); usb_acknowledge(SYS_USB_CONNECTED_ACK); @@ -101,6 +104,14 @@ static void usb_mode(int connect_timeout) info.state == TOPOFF ? "topoff" : info.state == CHARGING ? "charging" : ""); lcd_putsf(0, 8, "Battery: %d%%", battery_level()); + lcd_putsf(0, 9, "Die temp: %d°C [%d, %d]", + adc_read(ADC_DIE_TEMP), IMX233_DIE_TEMP_HIGH, + IMX233_DIE_TEMP_LOW); + #ifdef ADC_BATT_TEMP + lcd_putsf(0, 10, "Batt temp: %d [%d, %d]", + adc_read(ADC_BATT_TEMP), IMX233_BATT_TEMP_HIGH, + IMX233_BATT_TEMP_LOW); + #endif lcd_update(); } } @@ -137,19 +148,15 @@ void main(uint32_t arg, uint32_t addr) button_init(); - //button_debug_screen(); printf("Boot version: %s", RBVERSION); printf("arg=%x addr=%x", arg, addr); printf("power up source: %x", __XTRACT(HW_POWER_STS, PWRUP_SOURCE)); -#ifdef SANSA_FUZEPLUS - extern void imx233_mmc_disable_window(void); if(arg == 0xfee1dead) { - printf("Disable MMC window."); - imx233_mmc_disable_window(); + printf("Disable partitions window."); + imx233_partitions_enable_window(false); } -#endif ret = storage_init(); if(ret < 0) -- cgit v1.1