summaryrefslogtreecommitdiffstats
path: root/bootloader
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2012-05-19 13:33:45 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2012-05-19 16:10:52 +0200
commit07138ba2ba08ce586486baab081aa455eb021fea (patch)
tree5a751693228edaa964e2212528e0b41c06ccc553 /bootloader
parent61b129ac1e41014fc5da846c48a361c7ec752d76 (diff)
downloadrockbox-07138ba2ba08ce586486baab081aa455eb021fea.tar.gz
rockbox-07138ba2ba08ce586486baab081aa455eb021fea.tar.bz2
rockbox-07138ba2ba08ce586486baab081aa455eb021fea.zip
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
Diffstat (limited to 'bootloader')
-rw-r--r--bootloader/imx233.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/bootloader/imx233.c b/bootloader/imx233.c
index 6d356b9cce..c1ab4893c3 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" : "<unknown>");
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)