diff --git a/apps/SOURCES b/apps/SOURCES index 0191587ab3..1898fa6284 100644 --- a/apps/SOURCES +++ b/apps/SOURCES @@ -240,8 +240,6 @@ keymaps/keymap-ondavx767.c #elif (CONFIG_KEYPAD == SAMSUNG_YH820_PAD) \ || (CONFIG_KEYPAD == SAMSUNG_YH92X_PAD) keymaps/keymap-yh8xx_yh9xx.c -#elif CONFIG_KEYPAD == MINI2440_PAD -keymaps/keymap-mini2440.c #elif CONFIG_KEYPAD == PBELL_VIBE500_PAD keymaps/keymap-vibe500.c #elif CONFIG_KEYPAD == MPIO_HD200_PAD diff --git a/apps/keymaps/keymap-mini2440.c b/apps/keymaps/keymap-mini2440.c deleted file mode 100644 index 3fe0698fa0..0000000000 --- a/apps/keymaps/keymap-mini2440.c +++ /dev/null @@ -1,380 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * $Id$ - * - * Copyright (C) 2009 Bob Cousins - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ - -/* Button Code Definitions for the Mini2440 target - * based on Toshiba Gigabeat F keymap - */ -#include -#include -#include - -#include "config.h" -#include "action.h" -#include "button.h" -#include "settings.h" - -/* - * The format of the list is as follows - * { Action Code, Button code, Prereq button code } - * if there's no need to check the previous button's value, use BUTTON_NONE - * Insert LAST_ITEM_IN_LIST at the end of each mapping - */ - -/* CONTEXT_CUSTOM's used in this file... - -CONTEXT_CUSTOM|CONTEXT_TREE = the standard list/tree defines (without directions) -CONTEXT_CUSTOM|CONTEXT_SETTINGS = the direction keys for the eq/col picker screens - i.e where up/down is inc/dec - CONTEXT_SETTINGS = up/down is prev/next, l/r is inc/dec - -*/ - - -static const struct button_mapping button_context_standard[] = { - { ACTION_STD_PREV, BUTTON_UP, BUTTON_NONE }, - { ACTION_STD_PREVREPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_STD_NEXT, BUTTON_DOWN, BUTTON_NONE }, - { ACTION_STD_NEXTREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, - - { ACTION_STD_CANCEL, BUTTON_LEFT, BUTTON_NONE }, - { ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE }, - - { ACTION_STD_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT,BUTTON_SELECT }, - - { ACTION_STD_QUICKSCREEN, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU }, - { ACTION_STD_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU }, - - { ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT }, - { ACTION_STD_OK, BUTTON_RIGHT, BUTTON_NONE }, - - LAST_ITEM_IN_LIST -}; /* button_context_standard */ - - -static const struct button_mapping button_context_wps[] = { - { ACTION_WPS_PLAY, BUTTON_A|BUTTON_REL, BUTTON_A }, - { ACTION_WPS_STOP, BUTTON_POWER|BUTTON_REL, BUTTON_POWER }, - - { ACTION_WPS_SKIPNEXT, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT }, - { ACTION_WPS_SKIPPREV, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT }, - - { ACTION_WPS_SEEKBACK, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_WPS_SEEKFWD, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_WPS_STOPSEEK, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT|BUTTON_REPEAT }, - { ACTION_WPS_STOPSEEK, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT|BUTTON_REPEAT }, - - { ACTION_WPS_ABSETB_NEXTDIR,BUTTON_A|BUTTON_RIGHT, BUTTON_NONE }, - { ACTION_WPS_ABSETA_PREVDIR,BUTTON_A|BUTTON_LEFT, BUTTON_NONE }, - { ACTION_WPS_ABRESET, BUTTON_A|BUTTON_SELECT, BUTTON_NONE }, - - { ACTION_WPS_VOLDOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_WPS_VOLDOWN, BUTTON_DOWN, BUTTON_NONE }, - { ACTION_WPS_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE }, - { ACTION_WPS_VOLDOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_WPS_VOLUP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_WPS_VOLUP, BUTTON_UP, BUTTON_NONE }, - { ACTION_WPS_VOLUP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_WPS_VOLUP, BUTTON_VOL_UP, BUTTON_NONE }, - - { ACTION_WPS_PITCHSCREEN, BUTTON_A|BUTTON_UP, BUTTON_A }, - { ACTION_WPS_VIEW_PLAYLIST, BUTTON_A|BUTTON_DOWN, BUTTON_NONE }, - - { ACTION_WPS_QUICKSCREEN, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU }, - { ACTION_WPS_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU }, - { ACTION_WPS_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT }, - - { ACTION_WPS_HOTKEY, BUTTON_A|BUTTON_MENU, BUTTON_NONE }, - { ACTION_WPS_BROWSE, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT }, - - LAST_ITEM_IN_LIST -}; /* button_context_wps */ - -static const struct button_mapping button_context_list[] = { - { ACTION_LISTTREE_PGUP, BUTTON_A|BUTTON_UP, BUTTON_NONE }, - { ACTION_LISTTREE_PGUP, BUTTON_A|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_LISTTREE_PGDOWN, BUTTON_A|BUTTON_DOWN, BUTTON_NONE }, - { ACTION_LISTTREE_PGDOWN, BUTTON_A|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, -#ifdef HAVE_VOLUME_IN_LIST - { ACTION_LIST_VOLUP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_LIST_VOLUP, BUTTON_VOL_UP, BUTTON_NONE }, - { ACTION_LIST_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE }, - { ACTION_LIST_VOLDOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, -#endif - - LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) -}; /* button_context_list */ - -static const struct button_mapping button_context_tree[] = { - { ACTION_TREE_WPS, BUTTON_A|BUTTON_REL, BUTTON_A }, - { ACTION_TREE_STOP, BUTTON_POWER, BUTTON_NONE }, - { ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REL, BUTTON_POWER }, - { ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_TREE_HOTKEY, BUTTON_A|BUTTON_MENU, BUTTON_NONE }, - - LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST) -}; /* button_context_tree */ - -static const struct button_mapping button_context_listtree_scroll_with_combo[] = { - { ACTION_NONE, BUTTON_A, BUTTON_NONE }, - { ACTION_TREE_PGLEFT, BUTTON_A|BUTTON_LEFT, BUTTON_NONE }, - { ACTION_TREE_ROOT_INIT, BUTTON_A|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_A|BUTTON_LEFT }, - { ACTION_TREE_PGLEFT, BUTTON_A|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_TREE_PGRIGHT, BUTTON_A|BUTTON_RIGHT, BUTTON_NONE }, - { ACTION_TREE_PGRIGHT, BUTTON_A|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, - LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE), -}; - -static const struct button_mapping button_context_listtree_scroll_without_combo[] = { - { ACTION_NONE, BUTTON_LEFT, BUTTON_NONE }, - { ACTION_STD_CANCEL, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT }, - { ACTION_TREE_ROOT_INIT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_LEFT }, - { ACTION_TREE_PGLEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_NONE, BUTTON_RIGHT, BUTTON_NONE }, - { ACTION_STD_OK, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT }, - { ACTION_TREE_PGRIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, - LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE), -}; - -static const struct button_mapping button_context_settings[] = { - { ACTION_SETTINGS_INC, BUTTON_UP, BUTTON_NONE }, - { ACTION_SETTINGS_INCREPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_SETTINGS_DEC, BUTTON_DOWN, BUTTON_NONE }, - { ACTION_SETTINGS_DECREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_STD_PREV, BUTTON_LEFT, BUTTON_NONE }, - { ACTION_STD_PREVREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_STD_NEXT, BUTTON_RIGHT, BUTTON_NONE }, - { ACTION_STD_NEXTREPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, - - LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) -}; /* button_context_settings */ - -static const struct button_mapping button_context_settings_right_is_inc[] = { - { ACTION_SETTINGS_INC, BUTTON_RIGHT, BUTTON_NONE }, - { ACTION_SETTINGS_INCREPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_SETTINGS_DEC, BUTTON_LEFT, BUTTON_NONE }, - { ACTION_SETTINGS_DECREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_STD_PREV, BUTTON_UP, BUTTON_NONE }, - { ACTION_STD_PREVREPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_STD_NEXT, BUTTON_DOWN, BUTTON_NONE }, - { ACTION_STD_NEXTREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, - - LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) -}; /* button_context_settingsgraphical */ - -static const struct button_mapping button_context_yesno[] = { - { ACTION_YESNO_ACCEPT, BUTTON_SELECT, BUTTON_NONE }, - LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) -}; /* button_context_settings_yesno */ - -static const struct button_mapping button_context_colorchooser[] = { - { ACTION_STD_OK, BUTTON_A|BUTTON_REL, BUTTON_NONE }, - LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS), -}; /* button_context_colorchooser */ - -static const struct button_mapping button_context_eq[] = { - { ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE }, - LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS), -}; /* button_context_eq */ - -/** Bookmark Screen **/ -static const struct button_mapping button_context_bmark[] = { - { ACTION_BMS_DELETE, BUTTON_A, BUTTON_NONE }, - - LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST), -}; /* button_context_bmark */ - -static const struct button_mapping button_context_time[] = { - { ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE }, - { ACTION_STD_OK, BUTTON_A, BUTTON_NONE }, - LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS), -}; /* button_context_time */ - -static const struct button_mapping button_context_quickscreen[] = { - { ACTION_QS_TOP, BUTTON_UP, BUTTON_NONE }, - { ACTION_QS_TOP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_QS_DOWN, BUTTON_DOWN, BUTTON_NONE }, - { ACTION_QS_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_QS_LEFT, BUTTON_LEFT, BUTTON_NONE }, - { ACTION_QS_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_QS_RIGHT, BUTTON_RIGHT, BUTTON_NONE }, - { ACTION_QS_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_STD_CANCEL, BUTTON_MENU, BUTTON_NONE }, - - LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) -}; /* button_context_quickscreen */ - -static const struct button_mapping button_context_pitchscreen[] = { - { ACTION_PS_INC_SMALL, BUTTON_UP, BUTTON_NONE }, - { ACTION_PS_INC_BIG, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_PS_DEC_SMALL, BUTTON_DOWN, BUTTON_NONE }, - { ACTION_PS_DEC_BIG, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_PS_NUDGE_LEFT, BUTTON_LEFT, BUTTON_NONE }, - { ACTION_PS_NUDGE_LEFTOFF, BUTTON_LEFT|BUTTON_REL, BUTTON_NONE }, - { ACTION_PS_NUDGE_RIGHT, BUTTON_RIGHT, BUTTON_NONE }, - { ACTION_PS_NUDGE_RIGHTOFF, BUTTON_RIGHT|BUTTON_REL, BUTTON_NONE }, - { ACTION_PS_TOGGLE_MODE, BUTTON_MENU, BUTTON_NONE }, - { ACTION_PS_RESET, BUTTON_A, BUTTON_NONE }, - { ACTION_PS_EXIT, BUTTON_POWER, BUTTON_NONE }, - { ACTION_PS_SLOWER, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_PS_FASTER, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, - - LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) -}; /* button_context_pitchcreen */ - -static const struct button_mapping button_context_keyboard[] = { - { ACTION_KBD_LEFT, BUTTON_LEFT, BUTTON_NONE }, - { ACTION_KBD_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_KBD_RIGHT, BUTTON_RIGHT, BUTTON_NONE }, - { ACTION_KBD_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_KBD_CURSOR_LEFT, BUTTON_A|BUTTON_LEFT, BUTTON_NONE }, - { ACTION_KBD_CURSOR_LEFT, BUTTON_A|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_KBD_CURSOR_RIGHT, BUTTON_A|BUTTON_RIGHT, BUTTON_NONE }, - { ACTION_KBD_CURSOR_RIGHT, BUTTON_A|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_KBD_SELECT, BUTTON_SELECT, BUTTON_NONE }, - { ACTION_KBD_PAGE_FLIP, BUTTON_A|BUTTON_MENU, BUTTON_NONE }, - { ACTION_KBD_DONE, BUTTON_A|BUTTON_REL, BUTTON_A }, - { ACTION_KBD_ABORT, BUTTON_POWER|BUTTON_REL, BUTTON_POWER }, - { ACTION_KBD_BACKSPACE, BUTTON_MENU, BUTTON_NONE }, - { ACTION_KBD_BACKSPACE, BUTTON_MENU|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_KBD_UP, BUTTON_UP, BUTTON_NONE }, - { ACTION_KBD_UP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_KBD_DOWN, BUTTON_DOWN, BUTTON_NONE }, - { ACTION_KBD_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_KBD_MORSE_INPUT, BUTTON_A|BUTTON_POWER, BUTTON_NONE }, - { ACTION_KBD_MORSE_SELECT, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE }, - - LAST_ITEM_IN_LIST -}; /* button_context_keyboard */ - -#ifdef HAVE_MINI2440_REMOTE -/***************************************************************************** - * Remote control mappings - *****************************************************************************/ - -static const struct button_mapping remote_button_context_standard[] = { - { ACTION_STD_PREV, BUTTON_RC_VOL_UP, BUTTON_NONE }, - { ACTION_STD_PREVREPEAT, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_STD_NEXT, BUTTON_RC_VOL_DOWN, BUTTON_NONE }, - { ACTION_STD_NEXTREPEAT, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_STD_CANCEL, BUTTON_RC_REW, BUTTON_NONE }, - { ACTION_STD_OK, BUTTON_RC_FF|BUTTON_REL, BUTTON_RC_FF }, - { ACTION_STD_CONTEXT, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_RC_FF }, - { ACTION_STD_MENU, BUTTON_RC_DSP, BUTTON_NONE }, - - LAST_ITEM_IN_LIST -}; - -static const struct button_mapping remote_button_context_wps[] = { - { ACTION_WPS_PLAY, BUTTON_RC_PLAY, BUTTON_NONE }, - - { ACTION_WPS_SKIPNEXT, BUTTON_RC_FF|BUTTON_REL, BUTTON_RC_FF }, - { ACTION_WPS_SKIPPREV, BUTTON_RC_REW|BUTTON_REL, BUTTON_RC_REW }, - - { ACTION_WPS_SEEKBACK, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_WPS_SEEKFWD, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_WPS_STOPSEEK, BUTTON_RC_REW|BUTTON_REL, BUTTON_RC_REW|BUTTON_REPEAT }, - { ACTION_WPS_STOPSEEK, BUTTON_RC_FF|BUTTON_REL, BUTTON_RC_FF|BUTTON_REPEAT }, - - { ACTION_WPS_STOP, BUTTON_RC_PLAY|BUTTON_REPEAT, BUTTON_RC_PLAY }, - { ACTION_WPS_MENU, BUTTON_RC_DSP, BUTTON_NONE }, - - { ACTION_WPS_VOLDOWN, BUTTON_RC_VOL_DOWN, BUTTON_NONE }, - { ACTION_WPS_VOLDOWN, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_WPS_VOLUP, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, - { ACTION_WPS_VOLUP, BUTTON_RC_VOL_UP, BUTTON_NONE }, - - LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) -}; - -static const struct button_mapping remote_button_context_tree[] = { - { ACTION_TREE_WPS, BUTTON_RC_PLAY|BUTTON_REL, BUTTON_RC_PLAY }, - { ACTION_TREE_STOP, BUTTON_RC_PLAY|BUTTON_REPEAT, BUTTON_RC_PLAY }, - { ACTION_STD_CANCEL, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE }, - - LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) -}; - -static const struct button_mapping* get_context_mapping_remote( int context ) -{ - context ^= CONTEXT_REMOTE; - - switch (context) - { - case CONTEXT_WPS: - return remote_button_context_wps; - case CONTEXT_MAINMENU: - case CONTEXT_TREE: - return remote_button_context_tree; - } - return remote_button_context_standard; -} -#endif - -const struct button_mapping* target_get_context_mapping(int context) -{ -#ifdef HAVE_MINI2440_REMOTE - if (context&CONTEXT_REMOTE) - return get_context_mapping_remote(context); -#endif - switch (context) - { - case CONTEXT_STD: - return button_context_standard; - case CONTEXT_WPS: - return button_context_wps; - - case CONTEXT_LIST: - return button_context_list; - case CONTEXT_MAINMENU: - case CONTEXT_TREE: - if (global_settings.hold_lr_for_scroll_in_list) - return button_context_listtree_scroll_without_combo; - else - return button_context_listtree_scroll_with_combo; - case CONTEXT_CUSTOM|CONTEXT_TREE: - return button_context_tree; - - case CONTEXT_SETTINGS: - return button_context_settings; - case CONTEXT_CUSTOM|CONTEXT_SETTINGS: - return button_context_settings_right_is_inc; - - case CONTEXT_SETTINGS_COLOURCHOOSER: - return button_context_colorchooser; - case CONTEXT_SETTINGS_EQ: - return button_context_eq; - - case CONTEXT_SETTINGS_TIME: - return button_context_time; - - case CONTEXT_YESNOSCREEN: - return button_context_yesno; - case CONTEXT_BOOKMARKSCREEN: - return button_context_bmark; - case CONTEXT_QUICKSCREEN: - return button_context_quickscreen; - case CONTEXT_PITCHSCREEN: - return button_context_pitchscreen; - case CONTEXT_KEYBOARD: - return button_context_keyboard; - } - return button_context_standard; -} diff --git a/bootloader/SOURCES b/bootloader/SOURCES index 478cb9a73c..ff6a6b8d6f 100644 --- a/bootloader/SOURCES +++ b/bootloader/SOURCES @@ -53,12 +53,6 @@ sansa_as3525.c show_logo.c #elif CONFIG_CPU==IMX233 imx233.c -#elif defined(LYRE_PROTO1) -lyre_proto1.c -show_logo.c -#elif defined(MINI2440) -mini2440.c -show_logo.c #elif defined(PBELL_VIBE500) main-pp.c show_logo.c diff --git a/bootloader/lyre_proto1.c b/bootloader/lyre_proto1.c deleted file mode 100644 index 6ad095170c..0000000000 --- a/bootloader/lyre_proto1.c +++ /dev/null @@ -1,33 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * - * - * Copyright (C) 2009 by Jorge Pinto - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ - -/* Include Standard files */ -#include "../kernel-internal.h" -#include "system.h" - -int main(void) -{ - /* Initialize Rockbox kernel */ - kernel_init(); - - /* Never returns */ - while(1) ; -} diff --git a/bootloader/mini2440.c b/bootloader/mini2440.c deleted file mode 100644 index 3556fb0633..0000000000 --- a/bootloader/mini2440.c +++ /dev/null @@ -1,122 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * $Id$ - * - * Copyright (C) 2009 by Bob Cousins, Lyre Project - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ - -/* Include Standard files */ -#include -#include -#include "inttypes.h" -#include "string.h" -#include "cpu.h" -#include "system.h" -#include "lcd.h" -#include "../kernel-internal.h" -#include "storage.h" -#include "file_internal.h" -#include "disk.h" -#include "font.h" -#include "backlight.h" -#include "button.h" -#include "panic.h" -#include "power.h" -#include "file.h" -#include "common.h" -#include "rb-loader.h" -#include "loader_strerror.h" -#include "sd.h" -#include "backlight-target.h" -#include "lcd-target.h" -#include "dma-target.h" -#include "uart-s3c2440.h" -#include "led-mini2440.h" -#include "version.h" - - -int main(void) -{ - unsigned char* loadbuffer; - int buffer_size; - int rc; - int(*kernel_entry)(void); - - led_init(); - clear_leds(LED_ALL); - /* NB: something in system_init() prevents H-JTAG from downloading */ -/* system_init(); */ - kernel_init(); -/* enable_interrupt(IRQ_FIQ_STATUS); */ - lcd_init(); - backlight_init(); /* BUGFIX backlight_init MUST BE AFTER lcd_init */ - lcd_setfont(FONT_SYSFIXED); - button_init(); - dma_init(); - - uart_init(); - uart_init_device(DEBUG_UART_PORT); - -/* mini2440_test(); */ - - /* Show debug messages if button is pressed */ - int touch_data; - if(button_read_device(&touch_data) & BUTTON_MENU) - verbose = true; - - printf("Rockbox boot loader"); - printf("Version %s", rbversion); - - rc = storage_init(); - if(rc) - { - reset_screen(); - error(EATA, rc, true); - } - - filesystem_init(); - rc = disk_mount_all(); - if (rc<=0) - { - error(EDISK,rc, true); - } - - printf("Loading firmware"); - - /* Flush out anything pending first */ - commit_discard_idcache(); - - loadbuffer = (unsigned char*) 0x31000000; - buffer_size = (unsigned char*)0x31400000 - loadbuffer; - - rc = load_firmware(loadbuffer, BOOTFILE, buffer_size); - if(rc <= 0) - error(EBOOTFILE, rc, true); - - printf("Loaded firmware %d\n", rc); - -/* storage_close(); */ - system_prepare_fw_start(); - - commit_discard_idcache(); - kernel_entry = (void*) loadbuffer; - rc = kernel_entry(); - - /* end stop - should not get here */ - led_flash(LED_ALL, LED_NONE); - while (1); /* avoid warning */ -} diff --git a/firmware/SOURCES b/firmware/SOURCES index 4138efb672..6c0bec8219 100644 --- a/firmware/SOURCES +++ b/firmware/SOURCES @@ -929,7 +929,7 @@ target/arm/ipod/lcd-color_nano.c target/arm/ipod/lcd-gray.c #elif CONFIG_LCD == LCD_GIGABEATS target/arm/imx31/gigabeat-s/lcd-gigabeat-s.c -#elif CONFIG_LCD == LCD_GIGABEAT || CONFIG_LCD == LCD_MINI2440 +#elif CONFIG_LCD == LCD_GIGABEAT target/arm/s3c2440/lcd-s3c2440.c #elif CONFIG_LCD == LCD_ILI9342 || CONFIG_LCD == LCD_ILI9342C target/arm/rk27xx/ma/lcd-ma.c @@ -1826,34 +1826,6 @@ target/mips/ingenic_x1000/erosqnative/power-erosqnative.c target/mips/ingenic_x1000/spl-nand-x1000.c #endif /* EROS_QN */ -#if defined(LYRE_PROTO1) -target/arm/at91sam/lyre_proto1/adc-lyre_proto1.c -target/arm/at91sam/lyre_proto1/backlight-lyre_proto1.c -target/arm/at91sam/lyre_proto1/button-lyre_proto1.c -target/arm/at91sam/lyre_proto1/crt0.S -target/arm/at91sam/lyre_proto1/debug-lyre_proto1.c -target/arm/at91sam/lyre_proto1/kernel-lyre_proto1.c -target/arm/at91sam/lyre_proto1/lcd-lyre_proto1.c -target/arm/at91sam/lyre_proto1/system-lyre_proto1.c -target/arm/at91sam/lyre_proto1/timer-lyre_proto1.c -#endif - -#if defined(MINI2440) -drivers/lcd-memframe.c -target/arm/s3c2440/dma-s3c2440.c -target/arm/s3c2440/sd-s3c2440.c -target/arm/s3c2440/uart-s3c2440.c -target/arm/s3c2440/mini2440/backlight-mini2440.c -target/arm/s3c2440/mini2440/button-mini2440.c -target/arm/s3c2440/mini2440/led-mini2440.c -target/arm/s3c2440/mini2440/power-mini2440.c -target/arm/s3c2440/mini2440/touchscreen-mini2440.c -#ifndef BOOTLOADER -target/arm/s3c2440/mini2440/powermgmt-mini2440.c -target/arm/s3c2440/mini2440/pcm-mini2440.c -#endif -#endif /* MINI2440 */ - #if defined(SAMSUNG_YH820) || defined(SAMSUNG_YH920) || defined(SAMSUNG_YH925) target/arm/samsung/akcodec-yh82x_yh92x.c target/arm/samsung/button-yh82x_yh92x.c diff --git a/firmware/asm/SOURCES b/firmware/asm/SOURCES index 396381787a..ea1cf94cfa 100644 --- a/firmware/asm/SOURCES +++ b/firmware/asm/SOURCES @@ -50,7 +50,7 @@ mempcpy.c #if (defined(SANSA_E200) || defined(GIGABEAT_F) || defined(GIGABEAT_S) || \ defined(CREATIVE_ZVx) || defined(SANSA_CONNECT) || defined(SANSA_FUZEPLUS) || \ - defined(COWON_D2) || defined(MINI2440) || defined(SAMSUNG_YPR0) || \ + defined(COWON_D2) || defined(SAMSUNG_YPR0) || \ defined(SAMSUNG_YPR1) || defined(DX50) || defined(DX90) || (defined(MROBE_500) && !defined(LCD_USE_DMA)) || \ defined(CREATIVE_ZEN) || defined(CREATIVE_ZENXFI) || defined(SONY_NWZ_LINUX) || defined(HIBY_LINUX) || \ defined(FIIO_M3K_LINUX)) && \ diff --git a/firmware/export/at91sam9260.h b/firmware/export/at91sam9260.h deleted file mode 100644 index 87826d4d4d..0000000000 --- a/firmware/export/at91sam9260.h +++ /dev/null @@ -1,682 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * - * - * Copyright (C) 2009 by Jorge Pinto - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ - -/* MATRIX_MRCR : (MATRIX Offset: 0x100) MRCR Register */ -#define AT91C_MATRIX_RCA926I (0x1 << 0) /* (MATRIX) Remap Command for -ARM926EJ-S Instruction Master */ -#define AT91C_MATRIX_RCA926D (0x1 << 1) /* (MATRIX) Remap Command for -ARM926EJ-S Data Master */ - -/* Register definition for MATRIX peripheral */ -#define AT91C_MATRIX_MCFG0 (*(volatile unsigned long*) 0xFFFFEE00) /*(MATRIX) -Master Configuration Register 0 (ram96k) */ -#define AT91C_MATRIX_MCFG7 (*(volatile unsigned long*) 0xFFFFEE1C) /*(MATRIX) -Master Configuration Register 7 (teak_prog) */ -#define AT91C_MATRIX_SCFG1 (*(volatile unsigned long*) 0xFFFFEE44) /*(MATRIX) -Slave Configuration Register 1 (rom) */ -#define AT91C_MATRIX_MCFG4 (*(volatile unsigned long*) 0xFFFFEE10) /*(MATRIX) -Master Configuration Register 4 (bridge) */ -#define AT91C_MATRIX_VERSION (*(volatile unsigned long*) 0xFFFFEFFC) /*(MATRIX) -Version Register */ -#define AT91C_MATRIX_MCFG2 (*(volatile unsigned long*) 0xFFFFEE08) /*(MATRIX) -Master Configuration Register 2 (hperiphs) */ -#define AT91C_MATRIX_PRBS0 (*(volatile unsigned long*) 0xFFFFEE84) /*(MATRIX) -PRBS0 (ram0) */ -#define AT91C_MATRIX_SCFG3 (*(volatile unsigned long*) 0xFFFFEE4C) /*(MATRIX) -Slave Configuration Register 3 (ebi) */ -#define AT91C_MATRIX_MCFG6 (*(volatile unsigned long*) 0xFFFFEE18) /*(MATRIX) -Master Configuration Register 6 (ram16k) */ -#define AT91C_MATRIX_EBI (*(volatile unsigned long*) 0xFFFFEF1C) /*(MATRIX) -Slave 3 (ebi) Special Function Register */ -#define AT91C_MATRIX_SCFG0 (*(volatile unsigned long*) 0xFFFFEE40) /*(MATRIX) -Slave Configuration Register 0 (ram96k) */ -#define AT91C_MATRIX_PRAS0 (*(volatile unsigned long*) 0xFFFFEE80) /*(MATRIX) -PRAS0 (ram0) */ -#define AT91C_MATRIX_MCFG3 (*(volatile unsigned long*) 0xFFFFEE0C) /*(MATRIX) -Master Configuration Register 3 (ebi) */ -#define AT91C_MATRIX_PRAS1 (*(volatile unsigned long*) 0xFFFFEE88) /*(MATRIX) -PRAS1 (ram1) */ -#define AT91C_MATRIX_PRAS2 (*(volatile unsigned long*) 0xFFFFEE90) /*(MATRIX) -PRAS2 (ram2) */ -#define AT91C_MATRIX_SCFG2 (*(volatile unsigned long*) 0xFFFFEE48) /*(MATRIX) -Slave Configuration Register 2 (hperiphs) */ -#define AT91C_MATRIX_MCFG5 (*(volatile unsigned long*) 0xFFFFEE14) /*(MATRIX) -Master Configuration Register 5 (mailbox) */ -#define AT91C_MATRIX_MCFG1 (*(volatile unsigned long*) 0xFFFFEE04) /*(MATRIX) -Master Configuration Register 1 (rom) */ -#define AT91C_MATRIX_MRCR (*(volatile unsigned long*) 0xFFFFEF00) /*(MATRIX) -Master Remp Control Register */ -#define AT91C_MATRIX_PRBS2 (*(volatile unsigned long*) 0xFFFFEE94) /*(MATRIX) -PRBS2 (ram2) */ -#define AT91C_MATRIX_SCFG4 (*(volatile unsigned long*) 0xFFFFEE50) /*(MATRIX) -Slave Configuration Register 4 (bridge) */ -#define AT91C_MATRIX_TEAKCFG (*(volatile unsigned long*) 0xFFFFEF2C) /*(MATRIX) -Slave 7 (teak_prog) Special Function Register */ -#define AT91C_MATRIX_PRBS1 (*(volatile unsigned long*) 0xFFFFEE8C) /*(MATRIX) -PRBS1 (ram1) */ - -/* SOFTWARE API DEFINITION FOR Watchdog Timer Controller Interface */ -/* - WDTC_WDCR : (WDTC Offset: 0x0) Periodic Interval Image Register ---- */ -#define AT91C_WDTC_WDRSTT (0x1 << 0) /* (WDTC) Watchdog Restart */ -#define AT91C_WDTC_KEY (0xFF << 24) /* (WDTC) Watchdog KEY Password */ -/* -------- WDTC_WDMR : (WDTC Offset: 0x4) Watchdog Mode Register -------- */ -#define AT91C_WDTC_WDV (0xFFF << 0) /* (WDTC) Watchdog Timer Restart */ -#define AT91C_WDTC_WDFIEN (0x1 << 12) /* (WDTC) Watchdog Fault Interrupt -Enable */ -#define AT91C_WDTC_WDRSTEN (0x1 << 13) /* (WDTC) Watchdog Reset Enable */ -#define AT91C_WDTC_WDRPROC (0x1 << 14) /* (WDTC) Watchdog Timer Restart */ -#define AT91C_WDTC_WDDIS (0x1 << 15) /* (WDTC) Watchdog Disable */ -#define AT91C_WDTC_WDD (0xFFF << 16) /* (WDTC) Watchdog Delta Value */ -#define AT91C_WDTC_WDDBGHLT (0x1 << 28) /* (WDTC) Watchdog Debug Halt */ -#define AT91C_WDTC_WDIDLEHLT (0x1 << 29) /* (WDTC) Watchdog Idle Halt */ -/* -------- WDTC_WDSR : (WDTC Offset: 0x8) Watchdog Status Register ----- */ -#define AT91C_WDTC_WDUNF (0x1 << 0) /* (WDTC) Watchdog Underflow */ -#define AT91C_WDTC_WDERR (0x1 << 1) /* (WDTC) Watchdog Error */ - -/* SOFTWARE API DEFINITION FOR Watchdog Timer Controller Interface */ -/* - WDTC_WDCR : (WDTC Offset: 0x0) Periodic Interval Image Register ---- */ -#define AT91C_WDTC_WDRSTT (0x1 << 0) /* (WDTC) Watchdog Restart */ -#define AT91C_WDTC_KEY (0xFF << 24) /* (WDTC) Watchdog KEY Password */ -/* -------- WDTC_WDMR : (WDTC Offset: 0x4) Watchdog Mode Register -------- */ -#define AT91C_WDTC_WDV (0xFFF << 0) /* (WDTC) Watchdog Timer Restart */ -#define AT91C_WDTC_WDFIEN (0x1 << 12) /* (WDTC) Watchdog Fault Interrupt -Enable */ -#define AT91C_WDTC_WDRSTEN (0x1 << 13) /* (WDTC) Watchdog Reset Enable */ -#define AT91C_WDTC_WDRPROC (0x1 << 14) /* (WDTC) Watchdog Timer Restart */ -#define AT91C_WDTC_WDDIS (0x1 << 15) /* (WDTC) Watchdog Disable */ -#define AT91C_WDTC_WDD (0xFFF << 16) /* (WDTC) Watchdog Delta Value */ -#define AT91C_WDTC_WDDBGHLT (0x1 << 28) /* (WDTC) Watchdog Debug Halt */ -#define AT91C_WDTC_WDIDLEHLT (0x1 << 29) /* (WDTC) Watchdog Idle Halt */ -/* -------- WDTC_WDSR : (WDTC Offset: 0x8) Watchdog Status Register ----- */ -#define AT91C_WDTC_WDUNF (0x1 << 0) /* (WDTC) Watchdog Underflow */ -#define AT91C_WDTC_WDERR (0x1 << 1) /* (WDTC) Watchdog Error */ - -/* Register definition for WDTC peripheral */ -#define AT91C_WDTC_WDCR (*(volatile unsigned long*) 0xFFFFFD40) /* (WDTC) -Watchdog Control Register */ -#define AT91C_WDTC_WDSR (*(volatile unsigned long*) 0xFFFFFD48) /* (WDTC) -Watchdog Status Register */ -#define AT91C_WDTC_WDMR (*(volatile unsigned long*) 0xFFFFFD44) /* (WDTC) -Watchdog Mode Register */ - -/* CKGR_MOR : (CKGR Offset: 0x0) Main Oscillator Register */ -#define AT91C_CKGR_MOSCEN (0x1 << 0) /* (CKGR) Main Oscillator Enable */ -#define AT91C_CKGR_OSCBYPASS (0x1 << 1) /* (CKGR) Main Oscillator Bypass */ -#define AT91C_CKGR_OSCOUNT (0xFF << 8) /* (CKGR) Main Oscillator Start --up Time */ -/* CKGR_MCFR : (CKGR Offset: 0x4) Main Clock Frequency Register */ -#define AT91C_CKGR_MAINF (0xFFFF << 0) /* (CKGR) Main Clock Frequency */ -#define AT91C_CKGR_MAINRDY (0x1 << 16) /* (CKGR) Main Clock Ready */ -/* CKGR_PLLAR : (CKGR Offset: 0x8) PLL A Register */ -#define AT91C_CKGR_DIVA (0xFF << 0) /* (CKGR) Divider A Selected */ -#define AT91C_CKGR_DIVA_0 (0x0) /* (CKGR) Divider A output is 0 */ -#define AT91C_CKGR_DIVA_BYPASS (0x1) /* (CKGR) Divider A is bypassed */ -#define AT91C_CKGR_PLLACOUNT (0x3F << 8) /* (CKGR) PLL A Counter */ -#define AT91C_CKGR_OUTA (0x3 << 14) /* (CKGR) PLL A Output Frequency Range */ -#define AT91C_CKGR_OUTA_0 (0x0 << 14) /* (CKGR) Please -refer to the PLLA datasheet */ -#define AT91C_CKGR_OUTA_1 (0x1 << 14) /* (CKGR) Please -refer to the PLLA datasheet */ -#define AT91C_CKGR_OUTA_2 (0x2 << 14) /* (CKGR) Please -refer to the PLLA datasheet */ -#define AT91C_CKGR_OUTA_3 (0x3 << 14) /* (CKGR) Please -refer to the PLLA datasheet */ -#define AT91C_CKGR_MULA (0x7FF << 16) /* (CKGR) PLL A Multiplier */ -#define AT91C_CKGR_SRCA (0x1 << 29) /* (CKGR) */ -/* CKGR_PLLBR : (CKGR Offset: 0xc) PLL B Register */ -#define AT91C_CKGR_DIVB (0xFF << 0) /* (CKGR) Divider B Selected */ -#define AT91C_CKGR_DIVB_0 (0x0) /* (CKGR) Divider B output is 0 */ -#define AT91C_CKGR_DIVB_BYPASS (0x1) /* (CKGR) Divider B is bypassed */ -#define AT91C_CKGR_PLLBCOUNT (0x3F << 8) /* (CKGR) PLL B Counter */ -#define AT91C_CKGR_OUTB (0x3 << 14) /* (CKGR) PLL B Output Frequency Range */ -#define AT91C_CKGR_OUTB_0 (0x0 << 14) /* (CKGR) Please -refer to the PLLB datasheet */ -#define AT91C_CKGR_OUTB_1 (0x1 << 14) /* (CKGR) Please -refer to the PLLB datasheet */ -#define AT91C_CKGR_OUTB_2 (0x2 << 14) /* (CKGR) Please -refer to the PLLB datasheet */ -#define AT91C_CKGR_OUTB_3 (0x3 << 14) /* (CKGR) Please -refer to the PLLB datasheet */ -#define AT91C_CKGR_MULB (0x7FF << 16) /* (CKGR) PLL B Multiplier */ -#define AT91C_CKGR_USBDIV (0x3 << 28) /* (CKGR) Divider for USB Clocks */ -#define AT91C_CKGR_USBDIV_0 (0x0 << 28) /* (CKGR) -Divider output is PLL clock output */ -#define AT91C_CKGR_USBDIV_1 (0x1 << 28) /* (CKGR) -Divider output is PLL clock output divided by 2 */ -#define AT91C_CKGR_USBDIV_2 (0x2 << 28) /* (CKGR) -Divider output is PLL clock output divided by 4 */ - -/* SOFTWARE API DEFINITION FOR Power Management Controler */ -/* -------- PMC_SCER : (PMC Offset: 0x0) System Clock Enable Register ----- */ -#define AT91C_PMC_PCK (0x1 << 0) /* (PMC) Processor Clock */ -#define AT91C_PMC_UHP (0x1 << 6) /* (PMC) USB Host Port Clock */ -#define AT91C_PMC_UDP (0x1 << 7) /* (PMC) USB Device Port Clock */ -#define AT91C_PMC_PCK0 (0x1 << 8) /* (PMC) Programmable Clock Output */ -#define AT91C_PMC_PCK1 (0x1 << 9) /* (PMC) Programmable Clock Output */ -#define AT91C_PMC_HCK0 (0x1 << 16) /* (PMC) AHB UHP Clock Output */ -#define AT91C_PMC_HCK1 (0x1 << 17) /* (PMC) AHB LCDC Clock Output */ -/* -------- PMC_SCDR : (PMC Offset: 0x4) System Clock Disable Register ----- */ - /* -------- PMC_SCSR : (PMC Offset: 0x8) System Clock Status Register ----- */ - /* -------- CKGR_MOR : (PMC Offset: 0x20) Main Oscillator Register -------- */ - /* -------- CKGR_MCFR : (PMC Offset: 0x24) Main Clock Frequency Register--- */ - /* -------- CKGR_PLLAR : (PMC Offset: 0x28) PLL A Register -------- */ - /* -------- CKGR_PLLBR : (PMC Offset: 0x2c) PLL B Register -------- */ - /* -------- PMC_MCKR : (PMC Offset: 0x30) Master Clock Register -------- */ - #define AT91C_PMC_CSS (0x3 << 0) /* (PMC) Programmable Clock Selection */ - #define AT91C_PMC_CSS_SLOW_CLK (0x0) /* (PMC) Slow Clock is selected */ - #define AT91C_PMC_CSS_MAIN_CLK (0x1) /* (PMC) Main Clock is selected */ - #define AT91C_PMC_CSS_PLLA_CLK (0x2) /* (PMC) Clock from PLL A is selected */ - #define AT91C_PMC_CSS_PLLB_CLK (0x3) /* (PMC) Clock from PLL B is selected */ - #define AT91C_PMC_PRES (0x7 << 2) /* (PMC) Programmable Clock Prescaler */ - #define AT91C_PMC_PRES_CLK (0x0 << 2) /* (PMC) Selected clock */ - #define AT91C_PMC_PRES_CLK_2 (0x1 << 2) /* (PMC) Selected clock - divided by 2 */ - #define AT91C_PMC_PRES_CLK_4 (0x2 << 2) /* (PMC) Selected clock - divided by 4 */ - #define AT91C_PMC_PRES_CLK_8 (0x3 << 2) /* (PMC) Selected clock - divided by 8 */ - #define AT91C_PMC_PRES_CLK_16 (0x4 << 2) /* (PMC) Selected clock - divided by 16 */ - #define AT91C_PMC_PRES_CLK_32 (0x5 << 2) /* (PMC) Selected clock - divided by 32 */ - #define AT91C_PMC_PRES_CLK_64 (0x6 << 2) /* (PMC) Selected clock - divided by 64 */ - #define AT91C_PMC_MDIV (0x3 << 8) /* (PMC) Master Clock Divisionv */ - #define AT91C_PMC_MDIV_1 (0x0 << 8) /* (PMC) The master clock and the - processor clock are the same */ - #define AT91C_PMC_MDIV_2 (0x1 << 8) /* (PMC) The processor clock is twice - as fast as the master clock */ - #define AT91C_PMC_MDIV_3 (0x2 << 8) /* (PMC) The processor clock is four - times faster than the master clock */ - /* -------- PMC_PCKR : (PMC Offset: 0x40) Programmable Clock Register ----- */ - /* -------- PMC_IER : (PMC Offset: 0x60) PMC Interrupt Enable Register ---- */ - #define AT91C_PMC_MOSCS (0x1 << 0) /* (PMC) MOSC Status/Enable/Disable/Mask*/ - #define AT91C_PMC_LOCKA (0x1 << 1) /* (PMC) PLL A Status/Enable/Disable/ - Mask */ - #define AT91C_PMC_LOCKB (0x1 << 2) /* (PMC) PLL B Status/Enable/Disable/ - Mask */ - #define AT91C_PMC_MCKRDY (0x1 << 3) /* (PMC) Master Clock Status/Enable/ - Disable/Mask */ - #define AT91C_PMC_PCK0RDY (0x1 << 8) /* (PMC) PCK0_RDY Status/Enable/ - Disable/Mask */ - #define AT91C_PMC_PCK1RDY (0x1 << 9) /* (PMC) PCK1_RDY Status/Enable/ - Disable/Mask */ - /* ---PMC_IDR : (PMC Offset: 0x64) PMC Interrupt Disable Register -------- */ - /* ------ PMC_SR : (PMC Offset: 0x68) PMC Status Register -------- */ - #define AT91C_PMC_OSCSEL (0x1 << 7) /* (PMC) 32kHz Oscillator - selection status */ - /* -------- PMC_IMR : (PMC Offset: 0x6c) PMC Interrupt Mask Register ---- */ - -/* SOFTWARE API DEFINITION FOR Advanced Interrupt Controller */ -/* -------- AIC_SMR : (AIC Offset: 0x0) Control Register -------- */ -#define AT91C_AIC_PRIOR (0x7 << 0) /* (AIC) Priority Level */ -#define AT91C_AIC_PRIOR_LOWEST (0x0) /* (AIC) Lowest priority - level */ -#define AT91C_AIC_PRIOR_HIGHEST (0x7) /* (AIC) Highest - priority level */ -#define AT91C_AIC_SRCTYPE (0x3 << 5) /* (AIC) Interrupt Source Type */ -#define AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE (0x0 << 5) /* (AIC) - Internal Sources Code Label Level Sensitive */ -#define AT91C_AIC_SRCTYPE_INT_EDGE_TRIGGERED (0x1 << 5) /* (AIC) - Internal Sources Code Label Edge triggered */ -#define AT91C_AIC_SRCTYPE_EXT_HIGH_LEVEL (0x2 << 5) /* (AIC) - External Sources Code Label High-level Sensitive */ -#define AT91C_AIC_SRCTYPE_EXT_POSITIVE_EDGE (0x3 << 5) /* (AIC) - External Sources Code Label Positive Edge triggered */ -/* - AIC_CISR : (AIC Offset: 0x114) AIC Core Interrupt Status Register ----- */ -#define AT91C_AIC_NFIQ (0x1 << 0) /* (AIC) NFIQ Status */ -#define AT91C_AIC_NIRQ (0x1 << 1) /* (AIC) NIRQ Status */ -/* - AIC_DCR : (AIC Offset: 0x138) AIC Debug Control Register (Protect) ---- */ -#define AT91C_AIC_DCR_PROT (0x1 << 0) /* (AIC) Protection Mode */ -#define AT91C_AIC_DCR_GMSK (0x1 << 1) /* (AIC) General Mask */ - -/* Register definition for AIC peripheral */ -#define AT91C_AIC_IVR (*(volatile unsigned long*) 0xFFFFF100) /* (AIC) IRQ -Vector Register */ -#define AIC_IVR 0x00000100 -/* (AIC) Source Mode Register */ -#define AT91C_AIC_SMR(a) (*(volatile unsigned long*) (0xFFFFF000 + 4*(a))) -#define AT91C_AIC_FVR (*(volatile unsigned long*) 0xFFFFF104) /* (AIC) FIQ -Vector Register */ -#define AT91C_AIC_DCR (*(volatile unsigned long*) 0xFFFFF138) /* (AIC) Debug -Control Register (Protect) */ -#define AT91C_AIC_EOICR (*(volatile unsigned long*) 0xFFFFF130) /* (AIC) End -of Interrupt Command Register */ -#define AIC_EOICR 0x00000130 -/* (AIC) Source Vector Register */ -#define AT91C_AIC_SVR(a) (*(volatile unsigned long*) (0xFFFFF080 + 4*(a))) -#define AT91C_AIC_FFSR (*(volatile unsigned long*) 0xFFFFF148) /* (AIC) Fast -Forcing Status Register */ -#define AT91C_AIC_ICCR (*(volatile unsigned long*) 0xFFFFF128) /* (AIC) -Interrupt Clear Command Register */ -#define AT91C_AIC_ISR (*(volatile unsigned long*) 0xFFFFF108) /* (AIC) -Interrupt Status Register */ -#define AT91C_AIC_IMR (*(volatile unsigned long*) 0xFFFFF110) /* (AIC) -Interrupt Mask Register */ -#define AT91C_AIC_IPR (*(volatile unsigned long*) 0xFFFFF10C) /* (AIC) -Interrupt Pending Register */ -#define AT91C_AIC_FFER (*(volatile unsigned long*) 0xFFFFF140) /* (AIC) -Fast Forcing Enable Register */ -#define AT91C_AIC_IECR (*(volatile unsigned long*) 0xFFFFF120) /* (AIC) -Interrupt Enable Command Register */ -#define AT91C_AIC_ISCR (*(volatile unsigned long*) 0xFFFFF12C) /* (AIC) -Interrupt Set Command Register */ -#define AT91C_AIC_FFDR (*(volatile unsigned long*) 0xFFFFF144) /* (AIC) -Fast Forcing Disable Register */ -#define AT91C_AIC_CISR (*(volatile unsigned long*) 0xFFFFF114) /* (AIC) -Core Interrupt Status Register */ -#define AT91C_AIC_IDCR (*(volatile unsigned long*) 0xFFFFF124) /* (AIC) -Interrupt Disable Command Register */ -#define AT91C_AIC_SPU (*(volatile unsigned long*) 0xFFFFF134) /* (AIC) -Spurious Vector Register */ - -/* SOFTWARE API DEFINITION FOR Periodic Interval Timer Controller Interface */ -/* PITC_PIMR : (PITC Offset: 0x0) Periodic Interval Mode Register -------- */ -#define AT91C_PITC_PIV (0xFFFFF << 0) /* (PITC) Periodic Interval -Value */ -#define AT91C_PITC_PITEN (0x1 << 24) /* (PITC) Periodic Interval Timer -Enabled */ -#define AT91C_PITC_PITIEN (0x1 << 25) /* (PITC) Periodic Interval Timer -Interrupt Enable */ -/* --- PITC_PISR : (PITC Offset: 0x4) Periodic Interval Status Register - */ -#define AT91C_PITC_PITS (0x1 << 0) /* (PITC) Periodic Interval Timer -Status */ -/* - PITC_PIVR : (PITC Offset: 0x8) Periodic Interval Value Register ---- */ -#define AT91C_PITC_CPIV (0xFFFFF << 0) /* (PITC) Current Periodic -Interval Value */ -#define AT91C_PITC_PICNT (0xFFF << 20) /* (PITC) Periodic Interval Counter */ -/* PITC_PIIR : (PITC Offset: 0xc) Periodic Interval Image Register ---- */ - -/* Register definition for AIC peripheral */ -#define AT91C_AIC_IVR (*(volatile unsigned long*) 0xFFFFF100) /* (AIC) IRQ -Vector Register */ -#define AIC_IVR 0x00000100 -#define AT91C_AIC_EOICR (*(volatile unsigned long*) 0xFFFFF130) /* (AIC) End -of Interrupt Command Register */ -#define AIC_EOICR 0x00000130 - -/* Register definition for PIOA peripheral */ -#define AT91C_PIOA_ODR (*(volatile unsigned long*) 0xFFFFF414) /* (PIOA) -Output Disable Registerr */ -#define AT91C_PIOA_SODR (*(volatile unsigned long*) 0xFFFFF430) /* (PIOA) -Set Output Data Register */ -#define AT91C_PIOA_ISR (*(volatile unsigned long*) 0xFFFFF44C) /* (PIOA) -Interrupt Status Register */ -#define AT91C_PIOA_ABSR (*(volatile unsigned long*) 0xFFFFF478) /* (PIOA) -AB Select Status Register */ -#define AT91C_PIOA_IER (*(volatile unsigned long*) 0xFFFFF440) /* (PIOA) -Interrupt Enable Register */ -#define AT91C_PIOA_PPUDR (*(volatile unsigned long*) 0xFFFFF460) /* (PIOA) -Pull-up Disable Register */ -#define AT91C_PIOA_IMR (*(volatile unsigned long*) 0xFFFFF448) /* (PIOA) -Interrupt Mask Register */ -#define AT91C_PIOA_PER (*(volatile unsigned long*) 0xFFFFF400) /* (PIOA) -PIO Enable Register */ -#define AT91C_PIOA_IFDR (*(volatile unsigned long*) 0xFFFFF424) /* (PIOA) -Input Filter Disable Register */ -#define AT91C_PIOA_OWDR (*(volatile unsigned long*) 0xFFFFF4A4) /* (PIOA) -Output Write Disable Register */ -#define AT91C_PIOA_MDSR (*(volatile unsigned long*) 0xFFFFF458) /* (PIOA) -Multi-driver Status Register */ -#define AT91C_PIOA_IDR (*(volatile unsigned long*) 0xFFFFF444) /* (PIOA) -Interrupt Disable Register */ -#define AT91C_PIOA_ODSR (*(volatile unsigned long*) 0xFFFFF438) /* (PIOA) -Output Data Status Register */ -#define AT91C_PIOA_PPUSR (*(volatile unsigned long*) 0xFFFFF468) /* (PIOA) -Pull-up Status Register */ -#define AT91C_PIOA_OWSR (*(volatile unsigned long*) 0xFFFFF4A8) /* (PIOA) -Output Write Status Register */ -#define AT91C_PIOA_BSR (*(volatile unsigned long*) 0xFFFFF474) /* (PIOA) -Select B Register */ -#define AT91C_PIOA_OWER (*(volatile unsigned long*) 0xFFFFF4A0) /* (PIOA) -Output Write Enable Register */ -#define AT91C_PIOA_IFER (*(volatile unsigned long*) 0xFFFFF420) /* (PIOA) -Input Filter Enable Register */ -#define AT91C_PIOA_PDSR (*(volatile unsigned long*) 0xFFFFF43C) /* (PIOA) -Pin Data Status Register */ -#define AT91C_PIOA_PPUER (*(volatile unsigned long*) 0xFFFFF464) /* (PIOA) -Pull-up Enable Register */ -#define AT91C_PIOA_OSR (*(volatile unsigned long*) 0xFFFFF418) /* (PIOA) -Output Status Register */ -#define AT91C_PIOA_ASR (*(volatile unsigned long*) 0xFFFFF470) /* (PIOA) -Select A Register */ -#define AT91C_PIOA_MDDR (*(volatile unsigned long*) 0xFFFFF454) /* (PIOA) -Multi-driver Disable Register */ -#define AT91C_PIOA_CODR (*(volatile unsigned long*) 0xFFFFF434) /* (PIOA) -Clear Output Data Register */ -#define AT91C_PIOA_MDER (*(volatile unsigned long*) 0xFFFFF450) /* (PIOA) -Multi-driver Enable Register */ -#define AT91C_PIOA_PDR (*(volatile unsigned long*) 0xFFFFF404) /* (PIOA) -PIO Disable Register */ -#define AT91C_PIOA_IFSR (*(volatile unsigned long*) 0xFFFFF428) /* (PIOA) -Input Filter Status Register */ -#define AT91C_PIOA_OER (*(volatile unsigned long*) 0xFFFFF410) /* (PIOA) -Output Enable Register */ -#define AT91C_PIOA_PSR (*(volatile unsigned long*) 0xFFFFF408) /* (PIOA) -PIO Status Register */ - -/* Register definition for PIOB peripheral */ -#define AT91C_PIOB_OWDR (*(volatile unsigned long*) 0xFFFFF6A4) /* (PIOB) -Output Write Disable Register */ -#define AT91C_PIOB_MDER (*(volatile unsigned long*) 0xFFFFF650) /* (PIOB) -Multi-driver Enable Register */ -#define AT91C_PIOB_PPUSR (*(volatile unsigned long*) 0xFFFFF668) /* (PIOB) -Pull-up Status Register */ -#define AT91C_PIOB_IMR (*(volatile unsigned long*) 0xFFFFF648) /* (PIOB) -Interrupt Mask Register */ -#define AT91C_PIOB_ASR (*(volatile unsigned long*) 0xFFFFF670) /* (PIOB) -Select A Register */ -#define AT91C_PIOB_PPUDR (*(volatile unsigned long*) 0xFFFFF660) /* (PIOB) -Pull-up Disable Register */ -#define AT91C_PIOB_PSR (*(volatile unsigned long*) 0xFFFFF608) /* (PIOB) -PIO Status Register */ -#define AT91C_PIOB_IER (*(volatile unsigned long*) 0xFFFFF640) /* (PIOB) -Interrupt Enable Register */ -#define AT91C_PIOB_CODR (*(volatile unsigned long*) 0xFFFFF634) /* (PIOB) -Clear Output Data Register */ -#define AT91C_PIOB_OWER (*(volatile unsigned long*) 0xFFFFF6A0) /* (PIOB) -Output Write Enable Register */ -#define AT91C_PIOB_ABSR (*(volatile unsigned long*) 0xFFFFF678) /* (PIOB) -AB Select Status Register */ -#define AT91C_PIOB_IFDR (*(volatile unsigned long*) 0xFFFFF624) /* (PIOB) -Input Filter Disable Register */ -#define AT91C_PIOB_PDSR (*(volatile unsigned long*) 0xFFFFF63C) /* (PIOB) -Pin Data Status Register */ -#define AT91C_PIOB_IDR (*(volatile unsigned long*) 0xFFFFF644) /* (PIOB) -Interrupt Disable Register */ -#define AT91C_PIOB_OWSR (*(volatile unsigned long*) 0xFFFFF6A8) /* (PIOB) -Output Write Status Register */ -#define AT91C_PIOB_PDR (*(volatile unsigned long*) 0xFFFFF604) /* (PIOB) -PIO Disable Register */ -#define AT91C_PIOB_ODR (*(volatile unsigned long*) 0xFFFFF614) /* (PIOB) -Output Disable Registerr */ -#define AT91C_PIOB_IFSR (*(volatile unsigned long*) 0xFFFFF628) /* (PIOB) -Input Filter Status Register */ -#define AT91C_PIOB_PPUER (*(volatile unsigned long*) 0xFFFFF664) /* (PIOB) -Pull-up Enable Register */ -#define AT91C_PIOB_SODR (*(volatile unsigned long*) 0xFFFFF630) /* (PIOB) -Set Output Data Register */ -#define AT91C_PIOB_ISR (*(volatile unsigned long*) 0xFFFFF64C) /* (PIOB) -Interrupt Status Register */ -#define AT91C_PIOB_ODSR (*(volatile unsigned long*) 0xFFFFF638) /* (PIOB) -Output Data Status Register */ -#define AT91C_PIOB_OSR (*(volatile unsigned long*) 0xFFFFF618) /* (PIOB) -Output Status Register */ -#define AT91C_PIOB_MDSR (*(volatile unsigned long*) 0xFFFFF658) /* (PIOB) -Multi-driver Status Register */ -#define AT91C_PIOB_IFER (*(volatile unsigned long*) 0xFFFFF620) /* (PIOB) -Input Filter Enable Register */ -#define AT91C_PIOB_BSR (*(volatile unsigned long*) 0xFFFFF674) /* (PIOB) -Select B Register */ -#define AT91C_PIOB_MDDR (*(volatile unsigned long*) 0xFFFFF654) /* (PIOB) -Multi-driver Disable Register */ -#define AT91C_PIOB_OER (*(volatile unsigned long*) 0xFFFFF610) /* (PIOB) -Output Enable Register */ -#define AT91C_PIOB_PER (*(volatile unsigned long*) 0xFFFFF600) /* (PIOB) -PIO Enable Register */ - -/* Register definition for PIOC peripheral */ -#define AT91C_PIOC_OWDR (*(volatile unsigned long*) 0xFFFFF8A4) /* (PIOC) -Output Write Disable Register */ -#define AT91C_PIOC_SODR (*(volatile unsigned long*) 0xFFFFF830) /* (PIOC) -Set Output Data Register */ -#define AT91C_PIOC_PPUER (*(volatile unsigned long*) 0xFFFFF864) /* (PIOC) -Pull-up Enable Register */ -#define AT91C_PIOC_CODR (*(volatile unsigned long*) 0xFFFFF834) /* (PIOC) -Clear Output Data Register */ -#define AT91C_PIOC_PSR (*(volatile unsigned long*) 0xFFFFF808) /* (PIOC) -PIO Status Register */ -#define AT91C_PIOC_PDR (*(volatile unsigned long*) 0xFFFFF804) /* (PIOC) -PIO Disable Register */ -#define AT91C_PIOC_ODR (*(volatile unsigned long*) 0xFFFFF814) /* (PIOC) -Output Disable Register */ -#define AT91C_PIOC_PPUSR (*(volatile unsigned long*) 0xFFFFF868) /* (PIOC) -Pull-up Status Register */ -#define AT91C_PIOC_ABSR (*(volatile unsigned long*) 0xFFFFF878) /* (PIOC) -AB Select Status Register */ -#define AT91C_PIOC_IFSR (*(volatile unsigned long*) 0xFFFFF828) /* (PIOC) -Input Filter Status Register */ -#define AT91C_PIOC_OER (*(volatile unsigned long*) 0xFFFFF810) /* (PIOC) -Output Enable Register */ -#define AT91C_PIOC_IMR (*(volatile unsigned long*) 0xFFFFF848) /* (PIOC) -Interrupt Mask Register */ -#define AT91C_PIOC_ASR (*(volatile unsigned long*) 0xFFFFF870) /* (PIOC) -Select A Register */ -#define AT91C_PIOC_MDDR (*(volatile unsigned long*) 0xFFFFF854) /* (PIOC) -Multi-driver Disable Register */ -#define AT91C_PIOC_OWSR (*(volatile unsigned long*) 0xFFFFF8A8) /* (PIOC) -Output Write Status Register */ -#define AT91C_PIOC_PER (*(volatile unsigned long*) 0xFFFFF800) /* (PIOC) -PIO Enable Register */ -#define AT91C_PIOC_IDR (*(volatile unsigned long*) 0xFFFFF844) /* (PIOC) -Interrupt Disable Register */ -#define AT91C_PIOC_MDER (*(volatile unsigned long*) 0xFFFFF850) /* (PIOC) -Multi-driver Enable Register */ -#define AT91C_PIOC_PDSR (*(volatile unsigned long*) 0xFFFFF83C) /* (PIOC) -Pin Data Status Register */ -#define AT91C_PIOC_MDSR (*(volatile unsigned long*) 0xFFFFF858) /* (PIOC) -Multi-driver Status Register */ -#define AT91C_PIOC_OWER (*(volatile unsigned long*) 0xFFFFF8A0) /* (PIOC) -Output Write Enable Register */ -#define AT91C_PIOC_BSR (*(volatile unsigned long*) 0xFFFFF874) /* (PIOC) -Select B Register */ -#define AT91C_PIOC_PPUDR (*(volatile unsigned long*) 0xFFFFF860) /* (PIOC) -Pull-up Disable Register */ -#define AT91C_PIOC_IFDR (*(volatile unsigned long*) 0xFFFFF824) /* (PIOC) -Input Filter Disable Register */ -#define AT91C_PIOC_IER (*(volatile unsigned long*) 0xFFFFF840) /* (PIOC) -Interrupt Enable Register */ -#define AT91C_PIOC_OSR (*(volatile unsigned long*) 0xFFFFF818) /* (PIOC) -Output Status Register */ -#define AT91C_PIOC_ODSR (*(volatile unsigned long*) 0xFFFFF838) /* (PIOC) -Output Data Status Register */ -#define AT91C_PIOC_ISR (*(volatile unsigned long*) 0xFFFFF84C) /* (PIOC) -Interrupt Status Register */ -#define AT91C_PIOC_IFER (*(volatile unsigned long*) 0xFFFFF820) /* (PIOC) -Input Filter Enable Register */ - -/* Register definition for PMC peripheral */ -#define AT91C_PMC_PCER (*(volatile unsigned long*) 0xFFFFFC10) /* (PMC) -Peripheral Clock Enable Register */ -#define AT91C_PMC_PCKR (*(volatile unsigned long*) 0xFFFFFC40) /* (PMC) -Programmable Clock Register */ -#define AT91C_PMC_MCKR (*(volatile unsigned long*) 0xFFFFFC30) /* (PMC) -Master Clock Register */ -#define AT91C_PMC_PLLAR (*(volatile unsigned long*) 0xFFFFFC28) /* (PMC) -PLL A Register */ -#define AT91C_PMC_PCDR (*(volatile unsigned long*) 0xFFFFFC14) /* (PMC) -Peripheral Clock Disable Register */ -#define AT91C_PMC_SCSR (*(volatile unsigned long*) 0xFFFFFC08) /* (PMC) -System Clock Status Register */ -#define AT91C_PMC_MCFR (*(volatile unsigned long*) 0xFFFFFC24) /* (PMC) -Main Clock Frequency Register */ -#define AT91C_PMC_IMR (*(volatile unsigned long*) 0xFFFFFC6C) /* (PMC) -Interrupt Mask Register */ -#define AT91C_PMC_IER (*(volatile unsigned long*) 0xFFFFFC60) /* (PMC) -Interrupt Enable Register */ -#define AT91C_PMC_MOR (*(volatile unsigned long *) 0xFFFFFC20) /* (PMC) -Main Oscillator Register */ -#define AT91C_PMC_IDR (*(volatile unsigned long *) 0xFFFFFC64) /* (PMC) -Interrupt Disable Register */ -#define AT91C_PMC_PLLBR (*(volatile unsigned long*) 0xFFFFFC2C) /* (PMC) -PLL B Register */ -#define AT91C_PMC_SCDR (*(volatile unsigned long*) 0xFFFFFC04) /* (PMC) -System Clock Disable Register */ -#define AT91C_PMC_PCSR (*(volatile unsigned long*) 0xFFFFFC18) /* (PMC) -Peripheral Clock Status Register */ -#define AT91C_PMC_SCER (*(volatile unsigned long*) 0xFFFFFC00) /* (PMC) -System Clock Enable Register */ -#define AT91C_PMC_SR (*(volatile unsigned long*) 0xFFFFFC68) /* (PMC) -Status Register */ - -/* Register definition for PITC peripheral */ -#define AT91C_PITC_PIVR (*(volatile unsigned long*) 0xFFFFFD38) /* (PITC) -Period Interval Value Register */ -#define AT91C_PITC_PISR (*(volatile unsigned long*) 0xFFFFFD34) /* (PITC) -Period Interval Status Register */ -#define AT91C_PITC_PIIR (*(volatile unsigned long*) 0xFFFFFD3C) /* (PITC) -Period Interval Image Register */ -#define AT91C_PITC_PIMR (*(volatile unsigned long*) 0xFFFFFD30) /* (PITC) -Period Interval Mode Register */ - -/* PIO DEFINITIONS FOR AT91SAM9260 */ -#define AT91C_PIO_PA0 (1 << 0) /* Pin Controlled by PA0 */ -#define AT91C_PIO_PA1 (1 << 1) /* Pin Controlled by PA1 */ -#define AT91C_PIO_PA10 (1 << 10) /* Pin Controlled by PA10 */ -#define AT91C_PIO_PA11 (1 << 11) /* Pin Controlled by PA11 */ -#define AT91C_PIO_PA12 (1 << 12) /* Pin Controlled by PA12 */ -#define AT91C_PIO_PA13 (1 << 13) /* Pin Controlled by PA13 */ -#define AT91C_PIO_PA14 (1 << 14) /* Pin Controlled by PA14 */ -#define AT91C_PIO_PA15 (1 << 15) /* Pin Controlled by PA15 */ -#define AT91C_PIO_PA16 (1 << 16) /* Pin Controlled by PA16 */ -#define AT91C_PIO_PA17 (1 << 17) /* Pin Controlled by PA17 */ -#define AT91C_PIO_PA18 (1 << 18) /* Pin Controlled by PA18 */ -#define AT91C_PIO_PA19 (1 << 19) /* Pin Controlled by PA19 */ -#define AT91C_PIO_PA2 (1 << 2) /* Pin Controlled by PA2 */ -#define AT91C_PIO_PA20 (1 << 20) /* Pin Controlled by PA20 */ -#define AT91C_PIO_PA21 (1 << 21) /* Pin Controlled by PA21 */ -#define AT91C_PIO_PA22 (1 << 22) /* Pin Controlled by PA22 */ -#define AT91C_PIO_PA23 (1 << 23) /* Pin Controlled by PA23 */ -#define AT91C_PIO_PA24 (1 << 24) /* Pin Controlled by PA24 */ -#define AT91C_PIO_PA25 (1 << 25) /* Pin Controlled by PA25 */ -#define AT91C_PIO_PA26 (1 << 26) /* Pin Controlled by PA26 */ -#define AT91C_PIO_PA27 (1 << 27) /* Pin Controlled by PA27 */ -#define AT91C_PIO_PA28 (1 << 28) /* Pin Controlled by PA28 */ -#define AT91C_PIO_PA29 (1 << 29) /* Pin Controlled by PA29 */ -#define AT91C_PIO_PA3 (1 << 3) /* Pin Controlled by PA3 */ -#define AT91C_PIO_PA30 (1 << 30) /* Pin Controlled by PA30 */ -#define AT91C_PIO_PA31 (1 << 31) /* Pin Controlled by PA31 */ -#define AT91C_PIO_PA4 (1 << 4) /* Pin Controlled by PA4 */ -#define AT91C_PIO_PA5 (1 << 5) /* Pin Controlled by PA5 */ -#define AT91C_PIO_PA6 (1 << 6) /* Pin Controlled by PA6 */ -#define AT91C_PIO_PA7 (1 << 7) /* Pin Controlled by PA7 */ -#define AT91C_PIO_PA8 (1 << 8) /* Pin Controlled by PA8 */ -#define AT91C_PIO_PA9 (1 << 9) /* Pin Controlled by PA9 */ -#define AT91C_PIO_PB0 (1 << 0) /* Pin Controlled by PB0 */ -#define AT91C_PIO_PB1 (1 << 1) /* Pin Controlled by PB1 */ -#define AT91C_PIO_PB10 (1 << 10) /* Pin Controlled by PB10 */ -#define AT91C_PIO_PB11 (1 << 11) /* Pin Controlled by PB11 */ -#define AT91C_PIO_PB12 (1 << 12) /* Pin Controlled by PB12 */ -#define AT91C_PIO_PB13 (1 << 13) /* Pin Controlled by PB13 */ -#define AT91C_PIO_PB14 (1 << 14) /* Pin Controlled by PB14 */ -#define AT91C_PIO_PB15 (1 << 15) /* Pin Controlled by PB15 */ -#define AT91C_PIO_PB16 (1 << 16) /* Pin Controlled by PB16 */ -#define AT91C_PIO_PB17 (1 << 17) /* Pin Controlled by PB17 */ -#define AT91C_PIO_PB18 (1 << 18) /* Pin Controlled by PB18 */ -#define AT91C_PIO_PB19 (1 << 19) /* Pin Controlled by PB19 */ -#define AT91C_PIO_PB2 (1 << 2) /* Pin Controlled by PB2 */ -#define AT91C_PIO_PB20 (1 << 20) /* Pin Controlled by PB20 */ -#define AT91C_PIO_PB21 (1 << 21) /* Pin Controlled by PB21 */ -#define AT91C_PIO_PB22 (1 << 22) /* Pin Controlled by PB22 */ -#define AT91C_PIO_PB23 (1 << 23) /* Pin Controlled by PB23 */ -#define AT91C_PIO_PB24 (1 << 24) /* Pin Controlled by PB24 */ -#define AT91C_PIO_PB25 (1 << 25) /* Pin Controlled by PB25 */ -#define AT91C_PIO_PB26 (1 << 26) /* Pin Controlled by PB26 */ -#define AT91C_PIO_PB27 (1 << 27) /* Pin Controlled by PB27 */ -#define AT91C_PIO_PB28 (1 << 28) /* Pin Controlled by PB28 */ -#define AT91C_PIO_PB29 (1 << 29) /* Pin Controlled by PB29 */ -#define AT91C_PIO_PB3 (1 << 3) /* Pin Controlled by PB3 */ -#define AT91C_PIO_PB30 (1 << 30) /* Pin Controlled by PB30 */ -#define AT91C_PIO_PB31 (1 << 31) /* Pin Controlled by PB31 */ -#define AT91C_PIO_PB4 (1 << 4) /* Pin Controlled by PB4 */ -#define AT91C_PIO_PB5 (1 << 5) /* Pin Controlled by PB5 */ -#define AT91C_PIO_PB6 (1 << 6) /* Pin Controlled by PB6 */ -#define AT91C_PIO_PB7 (1 << 7) /* Pin Controlled by PB7 */ -#define AT91C_PIO_PB8 (1 << 8) /* Pin Controlled by PB8 */ -#define AT91C_PIO_PB9 (1 << 9) /* Pin Controlled by PB9 */ -#define AT91C_PIO_PC0 (1 << 0) /* Pin Controlled by PC0 */ -#define AT91C_PIO_PC1 (1 << 1) /* Pin Controlled by PC1 */ -#define AT91C_PIO_PC10 (1 << 10) /* Pin Controlled by PC10 */ -#define AT91C_PIO_PC11 (1 << 11) /* Pin Controlled by PC11 */ -#define AT91C_PIO_PC12 (1 << 12) /* Pin Controlled by PC12 */ -#define AT91C_PIO_PC13 (1 << 13) /* Pin Controlled by PC13 */ -#define AT91C_PIO_PC14 (1 << 14) /* Pin Controlled by PC14 */ -#define AT91C_PIO_PC15 (1 << 15) /* Pin Controlled by PC15 */ -#define AT91C_PIO_PC16 (1 << 16) /* Pin Controlled by PC16 */ -#define AT91C_PIO_PC17 (1 << 17) /* Pin Controlled by PC17 */ -#define AT91C_PIO_PC18 (1 << 18) /* Pin Controlled by PC18 */ -#define AT91C_PIO_PC19 (1 << 19) /* Pin Controlled by PC19 */ -#define AT91C_PIO_PC2 (1 << 2) /* Pin Controlled by PC2 */ -#define AT91C_PIO_PC20 (1 << 20) /* Pin Controlled by PC20 */ -#define AT91C_PIO_PC21 (1 << 21) /* Pin Controlled by PC21 */ -#define AT91C_PIO_PC22 (1 << 22) /* Pin Controlled by PC22 */ -#define AT91C_PIO_PC23 (1 << 23) /* Pin Controlled by PC23 */ -#define AT91C_PIO_PC24 (1 << 24) /* Pin Controlled by PC24 */ -#define AT91C_PIO_PC25 (1 << 25) /* Pin Controlled by PC25 */ -#define AT91C_PIO_PC26 (1 << 26) /* Pin Controlled by PC26 */ -#define AT91C_PIO_PC27 (1 << 27) /* Pin Controlled by PC27 */ -#define AT91C_PIO_PC28 (1 << 28) /* Pin Controlled by PC28 */ -#define AT91C_PIO_PC29 (1 << 29) /* Pin Controlled by PC29 */ -#define AT91C_PIO_PC3 (1 << 3) /* Pin Controlled by PC3 */ -#define AT91C_PIO_PC30 (1 << 30) /* Pin Controlled by PC30 */ -#define AT91C_PIO_PC31 (1 << 31) /* Pin Controlled by PC31 */ -#define AT91C_PIO_PC4 (1 << 4) /* Pin Controlled by PC4 */ -#define AT91C_PIO_PC5 (1 << 5) /* Pin Controlled by PC5 */ -#define AT91C_PIO_PC6 (1 << 6) /* Pin Controlled by PC6 */ -#define AT91C_PIO_PC7 (1 << 7) /* Pin Controlled by PC7 */ -#define AT91C_PIO_PC8 (1 << 8) /* Pin Controlled by PC8 */ -#define AT91C_PIO_PC9 (1 << 9) /* Pin Controlled by PC9 */ - -/* PERIPHERAL ID DEFINITIONS FOR AT91SAM9260 */ -#define AT91C_ID_FIQ ( 0) /* Advanced Interrupt Controller (FIQ) */ -#define AT91C_ID_SYS ( 1) /* System Controller */ -#define AT91C_ID_PIOA ( 2) /* Parallel IO Controller A */ -#define AT91C_ID_PIOB ( 3) /* Parallel IO Controller B */ -#define AT91C_ID_PIOC ( 4) /* Parallel IO Controller C */ -#define AT91C_ID_ADC ( 5) /* ADC */ -#define AT91C_ID_US0 ( 6) /* USART 0 */ -#define AT91C_ID_US1 ( 7) /* USART 1 */ -#define AT91C_ID_US2 ( 8) /* USART 2 */ -#define AT91C_ID_MCI ( 9) /* Multimedia Card Interface 0 */ -#define AT91C_ID_UDP (10) /* USB Device Port */ -#define AT91C_ID_TWI (11) /* Two-Wire Interface */ -#define AT91C_ID_SPI0 (12) /* Serial Peripheral Interface 0 */ -#define AT91C_ID_SPI1 (13) /* Serial Peripheral Interface 1 */ -#define AT91C_ID_SSC0 (14) /* Serial Synchronous Controller 0 */ -#define AT91C_ID_TC0 (17) /* Timer Counter 0 */ -#define AT91C_ID_TC1 (18) /* Timer Counter 1 */ -#define AT91C_ID_TC2 (19) /* Timer Counter 2 */ -#define AT91C_ID_UHP (20) /* USB Host Port */ -#define AT91C_ID_EMAC (21) /* Ethernet Mac */ -#define AT91C_ID_HISI (22) /* Image Sensor Interface */ -#define AT91C_ID_US3 (23) /* USART 3 */ -#define AT91C_ID_US4 (24) /* USART 4 */ -#define AT91C_ID_US5 (25) /* USART 5 */ -#define AT91C_ID_TC3 (26) /* Timer Counter 3 */ -#define AT91C_ID_TC4 (27) /* Timer Counter 4 */ -#define AT91C_ID_TC5 (28) /* Timer Counter 5 */ -#define AT91C_ID_IRQ0 (29) /* Advanced Interrupt Controller (IRQ0) */ -#define AT91C_ID_IRQ1 (30) /* Advanced Interrupt Controller (IRQ1) */ -#define AT91C_ID_IRQ2 (31) /* Advanced Interrupt Controller (IRQ2) */ -#define AT91C_ALL_INT (0xFFFE7FFF) /* ALL VALID INTERRUPTS */ - -/* MEMORY MAPPING DEFINITIONS FOR AT91SAM9260 */ -#define AT91C_IRAM_1 (0x00200000) /* Maximum IRAM_1 Area : 4Kbyte -base address */ -#define AT91C_IRAM_1_SIZE (0x00001000) /* Maximum IRAM_1 Area : 4Kbyte size - in byte (4 Kbytes) */ -#define AT91C_EBI_SDRAM_32BIT (0x20000000) /* SDRAM on EBI Chip Select 1 -base address */ -#define AT91C_BASE_AIC 0xFFFFF000 /* (AIC) Base Address */ - -/* Timer frequency */ -/* timer is based on PCLK and minimum division is 2 */ -#define TIMER_FREQ (49156800/2) diff --git a/firmware/export/config.h b/firmware/export/config.h index 9fb964be5d..e43dce9568 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h @@ -79,7 +79,6 @@ #define JZ4732 4732 #define JZ4760B 47602 #define AS3525 3525 -#define AT91SAM9260 9260 #define AS3525v2 35252 #define IMX233 233 #define RK27XX 2700 @@ -122,10 +121,8 @@ #define ONDAVX767_PAD 32 #define SANSA_CLIP_PAD 35 #define SANSA_FUZE_PAD 36 -#define LYRE_PROTO1_PAD 37 #define SAMSUNG_YH820_PAD 38 #define ONDAVX777_PAD 39 -#define MINI2440_PAD 41 #define PHILIPS_HDD6330_PAD 42 #define PBELL_VIBE500_PAD 43 #define MPIO_HD200_PAD 44 @@ -246,11 +243,9 @@ #define LCD_ONDAVX767 30 /* as used by the Onda VX767 */ #define LCD_SSD1303 31 /* as used by the Sansa Clip */ #define LCD_FUZE 32 /* as used by the Sansa Fuze */ -#define LCD_LYRE_PROTO1 33 /* as used by the Lyre prototype 1 */ #define LCD_YH925 34 /* as used by Samsung YH-925 (similar to the H10 20GB) */ #define LCD_VIEW 35 /* as used by the Sansa View */ #define LCD_NANO2G 36 /* as used by the iPod Nano 2nd Generation */ -#define LCD_MINI2440 37 /* as used by the Mini2440 */ #define LCD_HDD6330 38 /* as used by the Philips HDD6330 */ #define LCD_VIBE500 39 /* as used by the Packard Bell Vibe 500 */ #define LCD_IPOD6GNANO3G4G 40 /* as used by the iPod Classic, Nano 3G and Nano 4G */ @@ -485,10 +480,6 @@ Lyre prototype 1 */ #include "config/sansaclipzip.h" #elif defined(SANSA_C200V2) #include "config/sansac200v2.h" -#elif defined(LYRE_PROTO1) -#include "config/lyreproto1.h" -#elif defined(MINI2440) -#include "config/mini2440.h" #elif defined(SAMSUNG_YH820) #include "config/samsungyh820.h" #elif defined(SAMSUNG_YH920) diff --git a/firmware/export/config/lyreproto1.h b/firmware/export/config/lyreproto1.h deleted file mode 100644 index e30b3c4213..0000000000 --- a/firmware/export/config/lyreproto1.h +++ /dev/null @@ -1,102 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * - * - * Copyright (C) 2009 by Jorge Pinto - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ - -/* - * This config file is for the Lyre prototype 1. - */ - -#define CONFIG_SDRAM_START 0x20000000 - -/* For Rolo and boot loader */ -#define MODEL_NUMBER 130 - -/* define this if the flash memory uses the - * SecureDigital Memory Card protocol */ -#define CONFIG_STORAGE STORAGE_SD -#define HAVE_FLASH_STORAGE - - - - -/* define this if you have a colour LCD */ -#define HAVE_LCD_COLOR - -#define CONFIG_LCD LCD_LYRE_PROTO1 - -/* LCD dimensions */ -#define LCD_WIDTH 128 -#define LCD_HEIGHT 128 -/* sqrt(128^2 + 128^2) / 1.8 = 100.6 */ -#define LCD_DPI 101 -/* The LCD used is just rgb444, 64 colours. We do a bit conversion on LCD - * drivers. */ -#define LCD_DEPTH 16 /* 65536 colours */ -#define LCD_PIXELFORMAT RGB565 /* rgb565 */ - -#define HAVE_ALBUMART - -/* define this to enable bitmap scaling */ -#define HAVE_BMP_SCALING - -/* define this to enable JPEG decoding */ -#define HAVE_JPEG - -#define CONFIG_KEYPAD LYRE_PROTO1_PAD - - - - -/* The number of bytes reserved for loadable codecs */ -#define CODEC_SIZE 0x100000 - -/* The number of bytes reserved for loadable plugins */ -#define PLUGIN_BUFFER_SIZE 0x100000 - -/* Lyre prototype 1 do not use I2C, just SPI */ -#define CONFIG_I2C I2C_NONE - -/* Define this if you have the TLV320 audio codec -> controlled by the DSP */ -#define HAVE_TLV320 - -/* TLV320 has no tone controls, so we use the software ones */ -#define HAVE_SW_TONE_CONTROLS - -#define BATTERY_CAPACITY_DEFAULT 1100 /* default battery capacity */ -#define BATTERY_CAPACITY_MIN 500 /* min. capacity selectable */ -#define BATTERY_CAPACITY_MAX 2500 /* max. capacity selectable */ -#define BATTERY_CAPACITY_INC 100 /* capacity increment */ - - -#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE - -#define CONFIG_CPU AT91SAM9260 - -/* Define this to the CPU frequency */ -#define CPU_FREQ 198656000 -#define MCK_FREQ 99328000 -#define SLOW_CLOCK 32768 - -#define BOOTFILE_EXT "lyre_proto1" -#define BOOTFILE "rockbox." BOOTFILE_EXT -#define BOOTDIR "/.rockbox" - -/* Define this if a programmable hotkey is mapped */ -//#define HAVE_HOTKEY diff --git a/firmware/export/config/mini2440.h b/firmware/export/config/mini2440.h deleted file mode 100644 index b22098e859..0000000000 --- a/firmware/export/config/mini2440.h +++ /dev/null @@ -1,154 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * - * Copyright (C) 2009 by Bob Cousins, Lyre Project - * Copyright (C) 2009 by Jorge Pinto, Lyre Project - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ - -/* - * This config file is for the Mini2440 - */ - -/* For Rolo and boot loader */ -#define MODEL_NUMBER 131 -#define MODEL_NAME "Mini2440" - -/***************************************************************************/ -/* Hardware Config */ - -/* TODO: ??? */ -#define CONFIG_SDRAM_START 0x30000000 - -/* Flash storage */ -#define HAVE_FLASH_STORAGE -/* define the storage type */ -#define CONFIG_STORAGE STORAGE_SD - -#define HAVE_MULTIVOLUME -#define HAVE_HOTSWAP -#define HAVE_HOTSWAP_STORAGE_AS_MAIN -#define INCLUDE_TIMEOUT_API - -/* Disk storage */ -/* define this if you have a disk storage, i.e. something - that needs spinups and can cause skips when shaked */ -/* #define HAVE_DISK_STORAGE */ - -/* Display */ - - -/* define this if you have a colour LCD */ -#define HAVE_LCD_COLOR -/* The LCD is assumed to be 3.5" TFT touch screen, others are possible */ -#define CONFIG_LCD LCD_MINI2440 -/* LCD dimensions */ -#define LCD_WIDTH 240 -#define LCD_HEIGHT 320 -/* sqrt(240^2 + 320^2) / 3.5 = 114.3 */ -#define LCD_DPI 114 -#define LCD_DPI 114 /* 400 pixels diagonally / 3.5 inch */ -/* The LCD is configured for RGB565 */ -#define LCD_DEPTH 16 /* 65536 colours */ -#define LCD_PIXELFORMAT RGB565 /* rgb565 */ -/* Define this for LCD backlight available */ -/* The Mini2440 supports backlight brightness depending on LCD type */ -/* But the 3.5" LCD touch screen does not support brightness*/ -#define HAVE_BACKLIGHT -#define HAVE_BACKLIGHT_BRIGHTNESS -/* Main LCD backlight brightness range and defaults */ -#define MIN_BRIGHTNESS_SETTING 1 /* 0.5 mA */ -#define MAX_BRIGHTNESS_SETTING 12 /* 32 mA */ -#define DEFAULT_BRIGHTNESS_SETTING 10 /* 16 mA */ - -/* Keypad */ -#define CONFIG_KEYPAD MINI2440_PAD -#define HAVE_TOUCHSCREEN -#define HAVE_BUTTON_DATA - -/* I2C */ -/* We do not use currently use hardware I2C, but does not build without */ -#define CONFIG_I2C I2C_S3C2440 - -/* Define DAC/Codec */ -#define HAVE_UDA1341 - -#define HW_SAMPR_CAPS (SAMPR_CAP_44 | SAMPR_CAP_22 | SAMPR_CAP_11) - -/* Battery */ -#define BATTERY_CAPACITY_DEFAULT 1100 /* default battery capacity */ -#define BATTERY_CAPACITY_MIN 500 /* min. capacity selectable */ -#define BATTERY_CAPACITY_MAX 2500 /* max. capacity selectable */ -#define BATTERY_CAPACITY_INC 100 /* capacity increment */ - - -#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE - - - -/***************************************************************************/ -/* Application Config */ - -#define HAVE_ALBUMART -/* define this to enable bitmap scaling */ -#define HAVE_BMP_SCALING -/* define this to enable JPEG decoding */ -#define HAVE_JPEG - -#define HAVE_QUICKSCREEN - -/* define this if you have a real-time clock */ -#define CONFIG_RTC RTC_S3C2440 - - - - -/* The number of bytes reserved for loadable codecs */ -#define CODEC_SIZE 0x100000 - -/* The number of bytes reserved for loadable plugins */ -#define PLUGIN_BUFFER_SIZE 0x100000 - -#define CONFIG_CPU S3C2440 - -/* Define this to the CPU frequency */ -#define CPU_FREQ 406000000 -#define MCK_FREQ (CPU_FREQ/4) -#define SLOW_CLOCK 32768 - - -/* Define this if your LCD can set contrast */ -#define HAVE_LCD_CONTRAST -#define MIN_CONTRAST_SETTING 0 -#define MAX_CONTRAST_SETTING 63 -#define DEFAULT_CONTRAST_SETTING 47 /* Match boot contrast */ - -/* USB */ -/* TODO:#define HAVE_USBSTACK */ -#define USB_NONE - -#define HAVE_SERIAL - -/* Hardware controlled charging with monitoring */ -#define CONFIG_CHARGING CHARGING_MONITOR -/*#define POWER_INPUT_BATTERY 0*/ - -#define BOOTFILE_EXT "mini2440" -#define BOOTFILE "rockbox." BOOTFILE_EXT -#define BOOTDIR "/.rockbox" - -/* Define this if a programmable hotkey is mapped */ -#define HAVE_HOTKEY diff --git a/firmware/target/arm/at91sam/boot.lds b/firmware/target/arm/at91sam/boot.lds deleted file mode 100644 index 2497e09958..0000000000 --- a/firmware/target/arm/at91sam/boot.lds +++ /dev/null @@ -1,81 +0,0 @@ -OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") -OUTPUT_ARCH(arm) -ENTRY(reset_handler) -STARTUP(target/arm/at91sam/lyre_proto1/crt0.o) - -#define DRAMSIZE (MEMORYSIZE * 0x100000) -#define DRAMORIG 0x20000000 -#define IRAM0ORIG 0x200000 -#define IRAM0SIZE 4K -#define IRAM1ORIG 0x300000 -#define IRAM1SIZE 4K -#define STACKSIZE 2k - -MEMORY -{ - DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE - IRAM0 : ORIGIN = IRAM0ORIG, LENGTH = IRAM0SIZE -} - -SECTIONS -{ - /* We will put Rockbox bootloader at the last 1MByte of the SDRAM. */ - - /* Example of a section: - * .section VMA(Virtual Memory Address) : LMA(Load Memory Address). - * VMA and LMA addresses can be verified by doing: - * "arm-elf-objdump -h bootloader.elf". */ - - .vectors 0 : AT (DRAMORIG + DRAMSIZE - 1M) - { - _start_vectors_section = .; - KEEP(*(.vectors)) - *(.glue_7) - *(.glue_7t) - . = ALIGN(4); - _end_vectors_section = .; - } - - .text (DRAMORIG + DRAMSIZE -1M + SIZEOF(.vectors)) : \ - AT (DRAMORIG + DRAMSIZE -1M + SIZEOF(.vectors)) - { - *(.text) - *(.text*) - *(.icode) - *(.icode*) - *(.rodata) - *(.rodata*) - . = ALIGN(4); - } - - /* Initialized variables are placed on SDRAM, right after .vectors section. */ - /* Data section: VMA is the same as the LMA, right after the end of .vector */ - .data . : - { - *(.data) - *(.data*) - . = ALIGN(4); - _end_data_section = .; - } - - /* Uninitialized variables are placed at SDRAM, right after .text section. */ - .bss (NOLOAD) : - - { - _start_bss_section = .; - *(.bss) /* Bss section contains all uninitialized data generated by the compiler. */ - *(.bss*) - *(COMMON) - . = ALIGN(4); - _end_bss_section = .; - } - - /* Stack is placed at SDRAM, right after .bss section. */ - .stack . : - { - *(.stack) - stackbegin = .; - . += STACKSIZE; - stackend = .; - } -} diff --git a/firmware/target/arm/at91sam/lyre_proto1/adc-lyre_proto1.c b/firmware/target/arm/at91sam/lyre_proto1/adc-lyre_proto1.c deleted file mode 100644 index d3674055ab..0000000000 --- a/firmware/target/arm/at91sam/lyre_proto1/adc-lyre_proto1.c +++ /dev/null @@ -1,33 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * - * - * Copyright (C) 2009 by Jorge Pinto - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ - -#include "adc.h" - -void adc_init(void) -{ -} - -/* Called to get the recent ADC reading */ -inline unsigned short adc_read(int channel) -{ - (void)channel; - return 0; -} diff --git a/firmware/target/arm/at91sam/lyre_proto1/adc-target.h b/firmware/target/arm/at91sam/lyre_proto1/adc-target.h deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/firmware/target/arm/at91sam/lyre_proto1/backlight-lyre_proto1.c b/firmware/target/arm/at91sam/lyre_proto1/backlight-lyre_proto1.c deleted file mode 100644 index b60449417a..0000000000 --- a/firmware/target/arm/at91sam/lyre_proto1/backlight-lyre_proto1.c +++ /dev/null @@ -1,45 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * - * - * Copyright (C) 2009 by Jorge Pinto - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ - -void backlight_hw_brightness(int brightness) -{ - (void)brightness; -} - -void backlight_hw_on(void) -{ - -} - -void backlight_hw_off(void) -{ - -} - -void buttonlight_hw_on(void) -{ - -} - -void buttonlight_hw_off(void) -{ - -} diff --git a/firmware/target/arm/at91sam/lyre_proto1/backlight-target.h b/firmware/target/arm/at91sam/lyre_proto1/backlight-target.h deleted file mode 100644 index f4e253abbe..0000000000 --- a/firmware/target/arm/at91sam/lyre_proto1/backlight-target.h +++ /dev/null @@ -1,26 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * - * - * Copyright (C) 2009 by Jorge Pinto - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ - -#ifndef BACKLIGHT_TARGET_H -#define BACKLIGHT_TARGET_H - - -#endif diff --git a/firmware/target/arm/at91sam/lyre_proto1/button-lyre_proto1.c b/firmware/target/arm/at91sam/lyre_proto1/button-lyre_proto1.c deleted file mode 100644 index 2d38803115..0000000000 --- a/firmware/target/arm/at91sam/lyre_proto1/button-lyre_proto1.c +++ /dev/null @@ -1,99 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * - * - * Copyright (C) 2009 by Jorge Pinto - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ - -#include "at91sam9260.h" -#include "button.h" - -#define BUTTON_01 AT91C_PIO_PB4 -#define BUTTON_02 AT91C_PIO_PB5 -#define BUTTON_03 AT91C_PIO_PB27 -#define BUTTON_04 AT91C_PIO_PB26 -#define BUTTON_05 AT91C_PIO_PB25 -#define BUTTON_06 AT91C_PIO_PB24 -#define BUTTON_07 AT91C_PIO_PB22 -#define BUTTON_08 AT91C_PIO_PB23 - -void button_init_device(void) -{ - /* Enable the periph clock for the PIO controller */ - /* This is mandatory when PIO are configured as input */ - AT91C_PMC_PCER = (1 << AT91C_ID_PIOB); - - /* Set the PIO line in input */ - AT91C_PIOB_ODR = (BUTTON_01 | - BUTTON_02 | - BUTTON_03 | - BUTTON_04 | - BUTTON_05 | - BUTTON_06 | - BUTTON_07 | - BUTTON_08); - - /* Set the PIO controller in PIO mode instead of peripheral mode */ - AT91C_PIOB_PER = (BUTTON_01 | - BUTTON_02 | - BUTTON_03 | - BUTTON_04 | - BUTTON_05 | - BUTTON_06 | - BUTTON_07 | - BUTTON_08); -} - -bool button_hold(void) -{ - return (0); -} - -/* - * Get button pressed from hardware - */ -int button_read_device(void) -{ - uint32_t buttons = AT91C_PIOB_PDSR; - uint32_t ret = 0; - - if ((buttons & BUTTON_01) == 0) - ret |= BUTTON_UP; - - if ((buttons & BUTTON_02) == 0) - ret |= BUTTON_RIGHT; - - if ((buttons & BUTTON_03) == 0) - ret |= BUTTON_PLAY; - - if ((buttons & BUTTON_04) == 0) - ret |= BUTTON_SELECT; - - if ((buttons & BUTTON_05) == 0) - ret |= BUTTON_LEFT; - - if ((buttons & BUTTON_06) == 0) - ret |= BUTTON_DOWN; - - if ((buttons & BUTTON_07) == 0) - ret |= BUTTON_STOP; - - if ((buttons & BUTTON_08) == 0) - ret |= BUTTON_MENU; - - return ret; -} diff --git a/firmware/target/arm/at91sam/lyre_proto1/button-target.h b/firmware/target/arm/at91sam/lyre_proto1/button-target.h deleted file mode 100644 index bfba483df1..0000000000 --- a/firmware/target/arm/at91sam/lyre_proto1/button-target.h +++ /dev/null @@ -1,39 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * - * - * Copyright (C) 2009 by Jorge Pinto - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ - -#ifndef _BUTTON_TARGET_H_ -#define _BUTTON_TARGET_H_ - -#define BUTTON_SELECT 0x00000001 -#define BUTTON_MENU 0x00000002 -#define BUTTON_PLAY 0x00000004 -#define BUTTON_STOP 0x00000008 - -#define BUTTON_LEFT 0x00000010 -#define BUTTON_RIGHT 0x00000020 -#define BUTTON_UP 0x00000040 -#define BUTTON_DOWN 0x00000080 - -#define BUTTON_MAIN (BUTTON_UP|BUTTON_DOWN|BUTTON_RIGHT|BUTTON_LEFT \ - |BUTTON_SELECT|BUTTON_MENU|BUTTON_PLAY \ - |BUTTON_STOP) - -#endif /* _BUTTON_TARGET_H_ */ diff --git a/firmware/target/arm/at91sam/lyre_proto1/crt0.S b/firmware/target/arm/at91sam/lyre_proto1/crt0.S deleted file mode 100644 index 029c1b7aec..0000000000 --- a/firmware/target/arm/at91sam/lyre_proto1/crt0.S +++ /dev/null @@ -1,286 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * - * - * Copyright (C) 2009 by Jorge Pinto - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ - -#include "at91sam9260.h" - -#define DRAMORIG AT91C_EBI_SDRAM_32BIT -#define DRAMSIZE (MEMORYSIZE * 0x100000) -#define IRAM0ORIG AT91C_IRAM_1 -#define IRAM0SIZE AT91C_IRAM_1_SIZE -#define TOP_OF_MEMORY (IRAM0ORIG + IRAM0SIZE) -#define ABT_STACK_SIZE 8*3*4 -#define IRQ_STACK_SIZE 8*3*4 - -#define ARM_MODE_ABT 0x17 -#define ARM_MODE_FIQ 0x11 -#define ARM_MODE_IRQ 0x12 -#define ARM_MODE_SVC 0x13 -#define ARM_MODE_UND 0x1b -#define ARM_MODE_SYS 0x1f - -#define I_BIT 0x80 -#define F_BIT 0x40 - - -/* Application startup entry point */ -.globl reset_handler - -.align 4 - -.section .vectors -.arm - - -/* Exception vectors (should be a branch to be detected as a valid code - * by the rom) */ -_exception_vectors: -reset_vector: - ldr pc, =reset_handler -undef_vector: - b undef_vector /* Undefined Instruction */ -swi_vector: - b swi_vector /* Software Interrupt */ -pabt_vector: - ldr pc, =pabt_handler /* Prefetch Abort */ -dabt_vector: - ldr pc, =dabt_handler /* Data Abort */ -rsvd_vector: - b rsvd_vector /* reserved */ -irq_vector: - b irq_handler /* IRQ : read the AIC */ -fiq_vector: -/*----------------------------------------------------------------------------- - *- Function : fiq_handler - *- Treatments : FIQ (Fast Interrupt) Interrupt Handler. - *- Called Functions : - *---------------------------------------------------------------------------*/ -fiq_handler: -pabt_handler: -dabt_handler: - b fiq_handler - -/*----------------------------------------------------------------------------- - *- Function : irq_handler - *- Treatments : IRQ Controller Interrupt Handler. - *- Called Functions : AIC_IVR[interrupt] - *---------------------------------------------------------------------------*/ -irq_handler: -/*- Manage Exception Entry */ -/*- Adjust and save LR_irq in IRQ stack - (LR - Link Register) */ - sub lr, lr, #4 - stmfd sp!, {lr} -/*- Save r0 and SPSR (Saved Program Status Register) in IRQ stack */ - mrs r14, SPSR - stmfd sp!, {r0,r14} - -/*- Write in the IVR (Interrupt Vector Register) to support Protect Mode */ -/*- No effect in Normal Mode */ -/*- De-assert the NIRQ and clear the source in Protect Mode */ - ldr r14, =AT91C_BASE_AIC - ldr r0 , [r14, #AIC_IVR] - str r14, [r14, #AIC_IVR] - -/*- Enable Interrupt and Switch in Supervisor Mode */ - msr CPSR_c, #ARM_MODE_SVC - -/*- Save scratch/used registers and LR in User Stack */ - stmfd sp!, {r1-r3, r12, r14} - -/*- Branch to the routine pointed by the AIC_IVR */ - mov r14, pc - bx r0 - -/*- Restore scratch/used registers and LR from User Stack */ - ldmia sp!, {r1-r3, r12, r14} - -/*- Disable Interrupt and switch back in IRQ mode */ - msr CPSR_c, #ARM_MODE_IRQ | I_BIT - -/*- Mark the End of Interrupt on the AIC */ - ldr r14, =AT91C_BASE_AIC - str r14, [r14, #AIC_EOICR] - -/*- Restore SPSR_irq and r0 from IRQ stack */ - ldmia sp!, {r0,r14} - msr SPSR_cxsf, r14 - -/*- Restore adjusted LR_irq from IRQ stack directly in the PC */ - ldmia sp!, {pc}^ - -/*----------------------------------------------------------------------------- - *- Function : reset_handler - *- Treatments : Reset Interrupt Handler. - *- Called Functions : lowlevel_init - * main - *---------------------------------------------------------------------------*/ -.section .text -reset_handler: -/*----------------------------------------------------------------------------- - *- Low level Init is performed in a C function: lowlevel_init - *- Init Stack Pointer to a valid memory area before calling lowlevel_init - * - * Put Stack Pointer on end of IRAM 1 and branches to lowlevel_init function. - *---------------------------------------------------------------------------*/ -/*- Temporary stack in internal RAM for Low Level Init execution */ -_low_level_init: - ldr r2, =_litteral_pool_lowlevel_init /* Load r2 with the address of - * _litteral_pool_lowlevel_init - */ - ldmia r2, {r0, r1} /* r0 = lowlevel_init and r1 = TOP_OF_MEMORY */ - mov sp, r1 /* sp (Stack Pointer) = TOP_OF_MEMORY (end of IRAM 1) */ - mov lr, pc /* lr (Link register) = pc (Program Counter) */ - bx r0 /* Branch on C function (interworking) -- branch to - * lowlevel_init - */ - -/*----------------------------------------------------------------------------- - *- Setup the stack for each mode - * - * Executes this code after returning from lowlevel_init fucntion. - * Configures Abort Mode Stack + Interrupt Mode Stack + Supervisor Mode Stack, - * reserves 3 blocks, one for each mode and they start at end of IRAM 1. - *---------------------------------------------------------------------------*/ -_stack_init: - ldr r2, =_litteral_pool_stack_init - ldmia r2, {r0, r1, r2} /* r0 = TOP_OF_MEMORY (end of IRAM 1); - * r1 = ABT_STACK_SIZE; - * r2 = IRQ_STACK_SIZE - */ - - /*- Set up Interrupt Mode and set IRQ Mode Stack */ - msr CPSR_c, #ARM_MODE_IRQ | I_BIT | F_BIT /* Enter in Mode Interrupt - * and disable IRQ (Interrupt) and FIQ (Fast Interrupt) - */ - - mov sp, r0 /* sp (Interrupt Mode Stack Pointer) = - * TOP_OF_MEMORY (end of IRAM 1) - */ - - /*- Set up Abort Mode and set ABT Mode Stack */ - msr CPSR_c, #ARM_MODE_ABT | I_BIT | F_BIT /* Enter in Mode Abort - * and disable IRQ (Interrupt) and FIQ (Fast Interrupt) - */ - - mov sp, r0 /* sp (ABT Mode Stack Pointer) = TOP_OF_MEMORY - * (end of IRAM 1) - */ - - /*- Set up Abort Mode and set ABT Mode Stack */ - msr CPSR_c, #ARM_MODE_UND | I_BIT | F_BIT /* Enter in Mode Undefined - * and disable IRQ (Interrupt) and FIQ (Fast Interrupt) - */ - - mov sp, r0 /* sp (ABT Mode Stack Pointer) = TOP_OF_MEMORY - * (end of IRAM 1) - */ - - /*- Set up Supervisor Mode and set Supervisor Mode Stack */ - msr CPSR_c, #ARM_MODE_SVC | I_BIT | F_BIT - mov sp, r0 - - sub r0, r0, r2 /* Put on r0 the new address for next - * Stack (Sys Mode) - */ - - /*- Set up Sys Mode and set Sys Mode Stack */ - msr CPSR_c, #ARM_MODE_SYS | F_BIT /* Enter in Sys Mode - * and enable IRQ (Interrupt) and disable FIQ (Fast Interrupt) - */ - mov sp, r0 - -/*----------------------------------------------------------------------------- - *- Segments initialization - *---------------------------------------------------------------------------*/ -/* Copy the vectors section code from the LMA address to the LVA address */ -_init_vectors: - ldr r1, =_litteral_pool_vectors /* Load r1 with the address of - * _litteral_pool_vectors - */ - ldmia r1, {r2, r3, r4} /* r2 = DRAMORIG; r3 = _start_vectors_section; - * r4 = _end_vectors_section; - */ -1: - cmp r3, r4 /* Compare r3 with r4 (r3 - r4) */ - ldrcc r5, [r2], #4 /* if (_start_vectors_section < _end_vectors_section) - * { r5 = [r2]; r2 = r2 + 4; } - */ - strcc r5, [r3], #4 /* if (_start_vectors_section < _end_vectors_section) - * { [r3] = r5; r3 = r3 + 4; } - */ - bcc 1b /* loop while (_start_vectors_section < _end_vectors_section) */ - -/* Clear the bss segment */ -_init_bss: - ldr r2, =_litteral_pool_bss - ldmia r2, {r3, r4} /* r3 = _start_bss_section; r4 = _end_bss_section */ - mov r2, #0 /* r2 = 0 */ -1: - cmp r3, r4 /* Compare --> (_start_bss_section - _end_bss_section) */ - strcc r2, [r3], #4 /* if (_start_bss_section < _end_bss_section) { - * [r3] = 0; r3 = r3 + 4; } - */ - bcc 1b /* loop while _start_bss_section < _end_bss_section */ - -/* Set up some stack and munge it with 0xdeadbeef */ - ldr sp, =stackend - mov r3, sp - ldr r2, =stackbegin - ldr r4, =0xdeadbeef - -stackmunge: - cmp r3, r2 - strhi r4, [r2], #4 - bhi stackmunge - -/*----------------------------------------------------------------------------- - *- Branch to the main - *---------------------------------------------------------------------------*/ -_branch_main: - ldr r0, =main - mov lr, pc - bx r0 - -/*----------------------------------------------------------------------------- - *- Litteral pools - *---------------------------------------------------------------------------*/ -_litteral_pool_lowlevel_init: - .word lowlevel_init - .word TOP_OF_MEMORY /* Default SVC stack after power up */ - -_litteral_pool_stack_init: - .word TOP_OF_MEMORY /* Top of the stack */ - .word ABT_STACK_SIZE /* ABT stack size */ - .word IRQ_STACK_SIZE /* IRQ stack size */ - -_litteral_pool_bss: - .word _start_bss_section - .word _end_bss_section - -_litteral_pool_vectors: -#if defined(BOOTLOADER) - .word (DRAMORIG + DRAMSIZE - 0x100000) /* LMA address of vectors are at - * end of DRAM minus 1MByte - */ -#else - .word DRAMORIG /* LMA address of vectors are at DRAMORIG */ -#endif - .word _start_vectors_section - .word _end_vectors_section diff --git a/firmware/target/arm/at91sam/lyre_proto1/debug-lyre_proto1.c b/firmware/target/arm/at91sam/lyre_proto1/debug-lyre_proto1.c deleted file mode 100644 index 320833a55b..0000000000 --- a/firmware/target/arm/at91sam/lyre_proto1/debug-lyre_proto1.c +++ /dev/null @@ -1,33 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * - * - * Copyright (C) 2009 by Jorge Pinto - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ - -#include -#include "system.h" - -bool dbg_ports(void) -{ - return false; -} - -bool dbg_hw_info(void) -{ - return false; -} diff --git a/firmware/target/arm/at91sam/lyre_proto1/kernel-lyre_proto1.c b/firmware/target/arm/at91sam/lyre_proto1/kernel-lyre_proto1.c deleted file mode 100644 index 4d7167b3ba..0000000000 --- a/firmware/target/arm/at91sam/lyre_proto1/kernel-lyre_proto1.c +++ /dev/null @@ -1,78 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * - * - * Copyright (C) 2009 by Jorge Pinto - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ - -#include "config.h" -#include "system.h" -#include "kernel.h" -#include "timer.h" -#include "thread.h" -#include "at91sam9260.h" - -/*----------------------------------------------------------------------------- - * Function Name : pitc_handler - * Object : Handler for PITC interrupt - *---------------------------------------------------------------------------*/ -void pitc_handler(void) -{ - unsigned long pivr = 0; - unsigned long pisr = 0; - - /* Read the PISR */ - pisr = AT91C_PITC_PISR & AT91C_PITC_PITS; - - /* Read the PIVR. It acknowledges the IT */ - pivr = AT91C_PITC_PIVR; - - /* Run through the list of tick tasks */ - call_tick_tasks(); -} - -void tick_start(unsigned int interval_in_ms) -{ - volatile unsigned long pimr = 0; - - /* Configure a resolution of 1 ms */ - AT91C_PITC_PIMR = MCK_FREQ / (((16 * 1000) - 1) / interval_in_ms); - - /* Enable interrupts */ - /* Disable the interrupt on the interrupt controller */ - AT91C_AIC_IDCR = (1 << AT91C_ID_SYS); - - /* Save the interrupt handler routine pointer and the interrupt priority */ - AT91C_AIC_SVR(AT91C_ID_SYS) = (unsigned long) pitc_handler; - - /* Store the Source Mode Register */ - AT91C_AIC_SMR(AT91C_ID_SYS) = AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE | \ - AT91C_AIC_PRIOR_LOWEST; - /* Clear the interrupt on the interrupt controller */ - AT91C_AIC_ICCR = (1 << AT91C_ID_SYS); - - /* Enable the interrupt on the interrupt controller */ - AT91C_AIC_IECR = (1 << AT91C_ID_SYS); - - /* Enable the interrupt on the pit */ - pimr = AT91C_PITC_PIMR; - AT91C_PITC_PIMR = pimr | AT91C_PITC_PITIEN; - - /* Enable the pit */ - pimr = AT91C_PITC_PIMR; - AT91C_PITC_PIMR = pimr | AT91C_PITC_PITEN; -} diff --git a/firmware/target/arm/at91sam/lyre_proto1/lcd-lyre_proto1.c b/firmware/target/arm/at91sam/lyre_proto1/lcd-lyre_proto1.c deleted file mode 100644 index 258b2052a6..0000000000 --- a/firmware/target/arm/at91sam/lyre_proto1/lcd-lyre_proto1.c +++ /dev/null @@ -1,29 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * - * - * Copyright (C) 2009 by Jorge Pinto - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ - -#include "lcd.h" - -/* Update the display. - This must be called after all other LCD functions that change the display */ -void lcd_update(void) -{ - -} diff --git a/firmware/target/arm/at91sam/lyre_proto1/lcd-target.h b/firmware/target/arm/at91sam/lyre_proto1/lcd-target.h deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/firmware/target/arm/at91sam/lyre_proto1/system-lyre_proto1.c b/firmware/target/arm/at91sam/lyre_proto1/system-lyre_proto1.c deleted file mode 100644 index 34318d24aa..0000000000 --- a/firmware/target/arm/at91sam/lyre_proto1/system-lyre_proto1.c +++ /dev/null @@ -1,149 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * - * - * Copyright (C) 2009 by Jorge Pinto - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ - -/* Include Standard files */ -#include "at91sam9260.h" -#include "config.h" - -/*----------------------------------------------------------------------------- - * Function Name : default_spurious_handler - * Object : default handler for spurious interrupt - *---------------------------------------------------------------------------*/ -void default_spurious_handler(void) -{ - while (1); -} - -/*----------------------------------------------------------------------------- - * Function Name : default_fiq_handler - * Object : default handler for fast interrupt - *---------------------------------------------------------------------------*/ -void default_fiq_handler(void) -{ - while (1); -} - -/*----------------------------------------------------------------------------- - * Function Name : default_irq_handler - * Object : default handler for irq - *---------------------------------------------------------------------------*/ -void default_irq_handler(void) -{ -#if defined(BOOTLOADER) - while (1); -#endif -} - -/*----------------------------------------------------------------------------- - * Function Name : lowlevel_init - * Object : This function performs very low level HW initialization - * this function can use a Stack, depending the compilation - * optimization mode - *---------------------------------------------------------------------------*/ -void lowlevel_init(void) -{ - unsigned char i = 0; - - /* void default_fiq_handler(void) - * Init PMC Step 1. Enable Main Oscillator - * Main Oscillator startup time is board specific: - * Main Oscillator Startup Time worst case (3MHz) corresponds to 15ms - * (0x40 for AT91C_CKGR_OSCOUNT field) - */ - AT91C_PMC_MOR = (((AT91C_CKGR_OSCOUNT & (0x40 << 8)) | AT91C_CKGR_MOSCEN)); - /* Wait Main Oscillator stabilization */ - while (!(AT91C_PMC_SR & AT91C_PMC_MOSCS)); - - /* Init PMC Step 2. - * Set PLLA to 198,608MHz - * PLL Startup time depends on PLL RC filter: worst case is choosen. - * - * Crystal frequency = 18.432MHz; PLLA = (18.432 * 96) / 9 = 198,608MHz. - */ - - AT91C_PMC_PLLAR = (1 << 29) | - (0x60 << 16) | /* MULA = 96 */ - (0x2 << 14) | - (0x3f << 8) | - (0x09); /* DIVA = 9 */ - - /* Wait for PLLA stabilization */ - while (!(AT91C_PMC_SR & AT91C_PMC_LOCKA)); - /* Wait until the master clock is established for the case we already */ - /* turn on the PLLA */ - while (!(AT91C_PMC_SR & AT91C_PMC_MCKRDY)); - - /* Init PMC Step 3. - * Processor Clock = 198,608MHz (PLLA); Master clock = - * (198,608MHz (PLLA))/2 = 98,304MHz. - * The PMC_MCKR register must not be programmed in a single write operation - * (see. Product Errata Sheet) - */ - AT91C_PMC_MCKR = AT91C_PMC_PRES_CLK | AT91C_PMC_MDIV_2; - /* Wait until the master clock is established */ - while (!(AT91C_PMC_SR & AT91C_PMC_MCKRDY)); - - AT91C_PMC_MCKR |= AT91C_PMC_CSS_PLLA_CLK; - /* Wait until the master clock is established */ - while (!(AT91C_PMC_SR & AT91C_PMC_MCKRDY)); - - /* Reset AIC: assign default handler for each interrupt source - */ - - /* Disable the interrupt on the interrupt controller */ - AT91C_AIC_IDCR = (1 << AT91C_ID_SYS); - - /* Assign default handler for each IRQ source */ - AT91C_AIC_SVR(AT91C_ID_FIQ) = (int) default_fiq_handler; - for (i = 1; i < 31; i++) - { - AT91C_AIC_SVR(i) = (int) default_irq_handler; - } - AT91C_AIC_SPU = (unsigned int) default_spurious_handler; - - /* Perform 8 IT acknoledge (write any value in EOICR) */ - -/* The End of Interrupt Command Register (AIC_EOICR) must be written in order -to indicate to the AIC that the current interrupt is finished. This causes the -current level to be popped from the stack, restoring the previous current level -if one exists on the stack. If another interrupt is pending, with lower or -equal priority than the old current level but with higher priority than the new -current level, the nIRQ line is re-asserted, but the interrupt sequence does -not immediately start because the “I” bit is set in the core. -SPSR_irq is restored. Finally, the saved value of the link register is restored -directly into the PC. This has the effect of returning from the interrupt to -whatever was being executed before, and of loading the CPSR with the stored -SPSR, masking or unmasking the interrupts depending on the state saved in -SPSR_irq. */ - for (i = 0; i < 8 ; i++) - { - AT91C_AIC_EOICR = 0; - } - - /* Enable the interrupt on the interrupt controller */ - AT91C_AIC_IECR = (1 << AT91C_ID_SYS); - - /* Disable Watchdog */ - AT91C_WDTC_WDMR = AT91C_WDTC_WDDIS; - - /* Remap */ - AT91C_MATRIX_MRCR = AT91C_MATRIX_RCA926I | AT91C_MATRIX_RCA926D; -} diff --git a/firmware/target/arm/at91sam/lyre_proto1/system-target.h b/firmware/target/arm/at91sam/lyre_proto1/system-target.h deleted file mode 100644 index 479614f634..0000000000 --- a/firmware/target/arm/at91sam/lyre_proto1/system-target.h +++ /dev/null @@ -1,29 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * - * - * Copyright (C) 2009 by Jorge Pinto - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ - -#ifndef SYSTEM_TARGET_H -#define SYSTEM_TARGET_H - -#include "system-arm.h" - -void system_init(void); - -#endif /* SYSTEM_TARGET_H */ diff --git a/firmware/target/arm/at91sam/lyre_proto1/timer-lyre_proto1.c b/firmware/target/arm/at91sam/lyre_proto1/timer-lyre_proto1.c deleted file mode 100644 index 1b620e9c4f..0000000000 --- a/firmware/target/arm/at91sam/lyre_proto1/timer-lyre_proto1.c +++ /dev/null @@ -1,123 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * - * - * Copyright (C) 2009 by Jorge Pinto - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ - -#include "config.h" -#include "cpu.h" -#include "system.h" -#include "timer.h" -#include "logf.h" -#include "at91sam9260.h" - -/*----------------------------------------------------------------------------- - * Function Name : pitc_handler - * Object : Handler for PITC interrupt - *---------------------------------------------------------------------------*/ -void pitc_handler(void) -{ - unsigned long pivr = 0; - unsigned long pisr = 0; - - /* Read the PISR */ - pisr = AT91C_PITC_PISR & AT91C_PITC_PITS; - - if (pisr != 0) - { - /* Read the PIVR. It acknowledges the IT */ - pivr = AT91C_PITC_PIVR; - - if (pfn_timer != NULL) - pfn_timer(); - } -} - -bool timer_set(long cycles, bool start) -{ - if (cycles < 1000) /* Max value on PITC?? */ - { - if (start && pfn_unregister != NULL) - { - pfn_unregister(); - pfn_unregister = NULL; - } - - /* Configure a resolution of ms */ - AT91C_PITC_PIMR = MCK_FREQ / ( 16 * cycles) - 1; - - return true; - } - - return false; -} - -bool timer_start(void) -{ - bool retval = true; - volatile unsigned long pimr = 0; - - /* Configure a resolution of 1 ms */ - AT91C_PITC_PIMR = MCK_FREQ / (16 * 1000) - 1; - - /* Enable interrupts */ - /* Disable the interrupt on the interrupt controller */ - AT91C_AIC_IDCR = (1 << AT91C_ID_SYS); - - /* Save the interrupt handler routine pointer and the interrupt priority */ - AT91C_AIC_SVR(AT91C_ID_SYS) = (unsigned long) pitc_handler; - /* Store the Source Mode Register */ - AT91C_AIC_SMR(AT91C_ID_SYS) = AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE | \ - AT91C_AIC_PRIOR_LOWEST; - /* Clear the interrupt on the interrupt controller */ - AT91C_AIC_ICCR = (1 << AT91C_ID_SYS); - - /* Enable the interrupt on the interrupt controller */ - AT91C_AIC_IECR = (1 << AT91C_ID_SYS); - - /* Enable the interrupt on the pit */ - pimr = AT91C_PITC_PIMR; - AT91C_PITC_PIMR = pimr | AT91C_PITC_PITIEN; - - /* Enable the pit */ - pimr = AT91C_PITC_PIMR; - AT91C_PITC_PIMR = pimr | AT91C_PITC_PITEN; - - return retval; -} - -void timer_stop(void) -{ - volatile unsigned long pimr = 0; - - /* Disable the interrupt on the interrupt controller */ - AT91C_AIC_IDCR = (1 << AT91C_ID_SYS); - - /* Clear the interrupt on the interrupt controller */ - AT91C_AIC_ICCR = (1 << AT91C_ID_SYS); - - /* Disable the interrupt on the pit */ - pimr = AT91C_PITC_PIMR; - pimr &= ~AT91C_PITC_PITIEN; - AT91C_PITC_PIMR = pimr; - - /* Disable the pit */ - pimr = AT91C_PITC_PIMR; - pimr &= ~AT91C_PITC_PITEN; - AT91C_PITC_PIMR = pimr; -} diff --git a/firmware/target/arm/mmu-arm.S b/firmware/target/arm/mmu-arm.S index 2458118186..bb3bfa9815 100644 --- a/firmware/target/arm/mmu-arm.S +++ b/firmware/target/arm/mmu-arm.S @@ -24,7 +24,7 @@ /* Used by ARMv4 & ARMv5 CPUs with cp15 register and MMU */ -#if CONFIG_CPU == TCC7801 || CONFIG_CPU == AT91SAM9260 +#if CONFIG_CPU == TCC7801 /* MMU present but unused */ #define HAVE_TEST_AND_CLEAN_CACHE diff --git a/firmware/target/arm/s3c2440/adc-s3c2440.c b/firmware/target/arm/s3c2440/adc-s3c2440.c index 2e0cf8a512..f7faf54786 100644 --- a/firmware/target/arm/s3c2440/adc-s3c2440.c +++ b/firmware/target/arm/s3c2440/adc-s3c2440.c @@ -24,10 +24,6 @@ #include "adc-target.h" #include "kernel.h" -#ifdef MINI2440 -#include "touchscreen-target.h" -#endif - static unsigned short adc_readings[NUM_ADC_CHANNELS]; /* prototypes */ @@ -136,10 +132,6 @@ static void adc_tick(void) { channel = 0; } -#ifdef MINI2440 - /* interleave a touchscreen read if neccessary */ - touchscreen_scan_device(); -#endif /* setup the next conversion and start it*/ ADCCON = (ADCCON & ~(0x7<<3)) | (channel<<3) | 0x01; } diff --git a/firmware/target/arm/s3c2440/crt0.S b/firmware/target/arm/s3c2440/crt0.S index e103f4f49f..7f4cd2aa00 100644 --- a/firmware/target/arm/s3c2440/crt0.S +++ b/firmware/target/arm/s3c2440/crt0.S @@ -133,38 +133,6 @@ #define VAL_MRSRB7 0x00000030 #define VAL_GPACON 0x00FFFFFF -/****************************************************************************/ -#elif defined (MINI2440) - -/* For Mini2440 board or compatible */ -/* Clock and Power Management setup values */ -/* NB: clock settings must match values in s3c2440/system-target.h */ -#define VAL_CLKDIV 0x5 /* HCLK = FCLK/4, PCLK = HCLK/2 */ -#define VAL_UPLLCON 0x00038022 /* UCLK = 48 MHz */ -#define VAL_MPLLCON 0x000C3041 /* FCLK = 406 MHz */ - - -/* Memory Controller setup */ -#define VAL_BWSCON 0x22111112 -#define VAL_BANKCON0 0x00002F50 -#define VAL_BANKCON1 0x00000700 -#define VAL_BANKCON2 0x00000700 -#define VAL_BANKCON3 0x00000700 -#define VAL_BANKCON4 0x00000700 -#define VAL_BANKCON5 0x0007FFFC -#define VAL_BANKCON6 0x00018009 -#define VAL_BANKCON7 0x00018009 - -#define VAL_REFRESH 0x008E04EB -#define VAL_BANKSIZE 0x000000B2 -#define VAL_MRSRB6 0x00000030 -#define VAL_MRSRB7 0x00000030 - -#define VAL_GPACON 0x00FFFFFF -#define VAL_GPFCON 0x000055AA -#define VAL_GPGCON 0xAA2A0128 -#define VAL_GPGDAT 0x0000 - #else #error Unknown target #endif diff --git a/firmware/target/arm/s3c2440/debug-s3c2440.c b/firmware/target/arm/s3c2440/debug-s3c2440.c index de06a43bb9..92d78767eb 100644 --- a/firmware/target/arm/s3c2440/debug-s3c2440.c +++ b/firmware/target/arm/s3c2440/debug-s3c2440.c @@ -31,8 +31,6 @@ #ifdef GIGABEAT_F #define DEBUG_CANCEL BUTTON_POWER -#elif defined(MINI2440) -#define DEBUG_CANCEL BUTTON_MENU #endif bool dbg_hw_info(void) diff --git a/firmware/target/arm/s3c2440/dma-target.h b/firmware/target/arm/s3c2440/dma-target.h index 350a4a2d23..8be19640f5 100644 --- a/firmware/target/arm/s3c2440/dma-target.h +++ b/firmware/target/arm/s3c2440/dma-target.h @@ -29,9 +29,6 @@ #ifdef GIGABEAT_F #define DMA_CHAN_ATA 0 #define DMA_CHAN_AUDIO_OUT 2 -#elif defined(MINI2440) -#define DMA_CHAN_SD 0 -#define DMA_CHAN_AUDIO_OUT 2 #else #error Unsupported target #endif diff --git a/firmware/target/arm/s3c2440/mini2440/adc-target.h b/firmware/target/arm/s3c2440/mini2440/adc-target.h deleted file mode 100644 index 5abf0d06c5..0000000000 --- a/firmware/target/arm/s3c2440/mini2440/adc-target.h +++ /dev/null @@ -1,38 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * $Id$ - * - * Copyright (C) 2009 by Bob Cousins - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ -#ifndef _ADC_TARGET_H_ -#define _ADC_TARGET_H_ - -/* Channel 0 is connected to an on board pot for testing - Channels 0-3 are available via expansion connector CON4 - Channels 4-7 are routed to LCD connector for touchscreen operation if - supported by display panel. -*/ -#define NUM_ADC_CHANNELS 4 - -#define ADC_ONBOARD 0 -#define ADC_SPARE_1 1 -#define ADC_SPARE_2 2 -#define ADC_SPARE_3 3 - -#define ADC_READ_ERROR 0xFFFF - -#endif diff --git a/firmware/target/arm/s3c2440/mini2440/backlight-mini2440.c b/firmware/target/arm/s3c2440/mini2440/backlight-mini2440.c deleted file mode 100644 index c4b93da9bc..0000000000 --- a/firmware/target/arm/s3c2440/mini2440/backlight-mini2440.c +++ /dev/null @@ -1,159 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * $Id$ - * - * Copyright (C) 2009 by Bob Cousins - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ -#include "config.h" -#include "cpu.h" -#include "system.h" -#include "backlight-target.h" -#include "backlight.h" -#include "lcd.h" -#include "power.h" - - -/* Dummy value at index 0, 1-12 used. */ -static const unsigned char log_brightness[13] = - {0,0,1,2,3,5,7,10,15,22,31,44,63}; - - -static enum backlight_states -{ - BACKLIGHT_CONTROL_IDLE, - BACKLIGHT_CONTROL_OFF, - BACKLIGHT_CONTROL_ON, - BACKLIGHT_CONTROL_SET, - BACKLIGHT_CONTROL_FADE -} backlight_control; - -static unsigned char _backlight_brightness; -static unsigned char backlight_target; - - -/* Assumes that the backlight has been initialized */ -void backlight_hw_brightness(int brightness) -{ - if (brightness < 0) - brightness = 0; - else if(brightness > MAX_BRIGHTNESS_SETTING) - brightness = MAX_BRIGHTNESS_SETTING; - - /* stop the interrupt from messing us up */ - backlight_control = BACKLIGHT_CONTROL_IDLE; - _backlight_brightness = log_brightness[brightness]; - backlight_control = BACKLIGHT_CONTROL_SET; -} - -static void _backlight_set_state (unsigned int level) -{ - if (level == 0) - GPGDAT &= ~GPIO_LCD_PWR; - else - GPGDAT |= GPIO_LCD_PWR; -} - -/* led_control_service runs in interrupt context - be brief! - * This service is called once per interrupt timer tick - 100 times a second. - * - * There should be at most only one i2c operation per call - if more are need - * the calls should be spread across calls. - * - * Putting all led servicing in one thread means that we wont step on any - * i2c operations - they are all serialized here in the ISR tick. It also - * insures that we get called at equal timing for good visual effect. - */ -#ifndef BOOTLOADER -static void led_control_service(void) -{ - switch (backlight_control) - { - case BACKLIGHT_CONTROL_IDLE: - backlight_control = BACKLIGHT_CONTROL_IDLE; - break; - case BACKLIGHT_CONTROL_OFF: - backlight_hw_brightness(0); - backlight_control = BACKLIGHT_CONTROL_IDLE; - break; - case BACKLIGHT_CONTROL_ON: - backlight_hw_brightness(DEFAULT_BRIGHTNESS_SETTING); - backlight_control = BACKLIGHT_CONTROL_IDLE; - break; - case BACKLIGHT_CONTROL_SET: - /* TODO: This is probably wrong since it sets a fixed value. - It was a fixed value of 255 before, but that was even more wrong - since it accessed the log_brightness buffer out of bounds */ - backlight_hw_brightness(DEFAULT_BRIGHTNESS_SETTING); - backlight_control = BACKLIGHT_CONTROL_IDLE; - break; - case BACKLIGHT_CONTROL_FADE: - backlight_hw_brightness(0); - backlight_control = BACKLIGHT_CONTROL_IDLE; - break; - default: - backlight_control = BACKLIGHT_CONTROL_IDLE; - break; - } -} -#endif /* BOOTLOADER */ - -static void __backlight_dim(bool dim_now) -{ - /* dont let the interrupt tick happen */ - backlight_control = BACKLIGHT_CONTROL_IDLE; - backlight_target = dim_now ? 0 : _backlight_brightness; - if(backlight_target==0 && _backlight_brightness==0) - { - if(dim_now == false) - backlight_control = BACKLIGHT_CONTROL_ON; - else - backlight_control = BACKLIGHT_CONTROL_OFF; - } - else - backlight_control = BACKLIGHT_CONTROL_FADE; -} - -void backlight_hw_on(void) -{ -#ifdef HAVE_LCD_ENABLE - lcd_enable(true); /* power on lcd + visible display */ -#endif - __backlight_dim(false); -} - -void backlight_hw_off(void) -{ - __backlight_dim(true); -} - - -bool backlight_hw_init(void) -{ - unsigned char brightness = log_brightness[DEFAULT_BRIGHTNESS_SETTING]; - _backlight_brightness = brightness; - - backlight_control = BACKLIGHT_CONTROL_ON; - - _backlight_set_state (1); - S3C2440_GPIO_CONFIG (GPGCON, 4, GPIO_OUTPUT); - -#ifndef BOOTLOADER - /* put the led control on the tick list */ - tick_add_task(led_control_service); -#endif - return true; -} diff --git a/firmware/target/arm/s3c2440/mini2440/backlight-target.h b/firmware/target/arm/s3c2440/mini2440/backlight-target.h deleted file mode 100644 index ceb6824841..0000000000 --- a/firmware/target/arm/s3c2440/mini2440/backlight-target.h +++ /dev/null @@ -1,31 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * $Id$ - * - * Copyright (C) 2006 by Linus Nielsen Feltzing - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ -#ifndef BACKLIGHT_TARGET_H -#define BACKLIGHT_TARGET_H - -#define GPIO_LCD_PWR (1 << 4) /* GPIO.G4 */ - -bool backlight_hw_init(void); -void backlight_hw_on(void); -void backlight_hw_off(void); -void backlight_hw_brightness(int brightness); - -#endif diff --git a/firmware/target/arm/s3c2440/mini2440/button-mini2440.c b/firmware/target/arm/s3c2440/mini2440/button-mini2440.c deleted file mode 100644 index 981e2a1280..0000000000 --- a/firmware/target/arm/s3c2440/mini2440/button-mini2440.c +++ /dev/null @@ -1,92 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * $Id$ - * - * Copyright (C) 2009 by Bob Cousins - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ - -#include "config.h" -#include "cpu.h" -#include "system.h" -#include "button.h" -#include "kernel.h" -#include "touchscreen-target.h" - -void button_init_device(void) -{ - /* Configure port directions and enable internal pullups on button inputs */ - - /* These are the standard 6 buttons on the Mini2440 */ - S3C2440_GPIO_CONFIG (GPGCON, 0, GPIO_INPUT); - S3C2440_GPIO_CONFIG (GPGCON, 3, GPIO_INPUT); - S3C2440_GPIO_CONFIG (GPGCON, 5, GPIO_INPUT); - S3C2440_GPIO_CONFIG (GPGCON, 6, GPIO_INPUT); - S3C2440_GPIO_CONFIG (GPGCON, 7, GPIO_INPUT); - S3C2440_GPIO_CONFIG (GPGCON, 11, GPIO_INPUT); - - S3C2440_GPIO_PULLUP (GPGUP, 0, GPIO_PULLUP_ENABLE); - S3C2440_GPIO_PULLUP (GPGUP, 3, GPIO_PULLUP_ENABLE); - S3C2440_GPIO_PULLUP (GPGUP, 5, GPIO_PULLUP_ENABLE); - S3C2440_GPIO_PULLUP (GPGUP, 6, GPIO_PULLUP_ENABLE); - S3C2440_GPIO_PULLUP (GPGUP, 7, GPIO_PULLUP_ENABLE); - S3C2440_GPIO_PULLUP (GPGUP, 11, GPIO_PULLUP_ENABLE); - - /* These are additional buttons on my add on keypad */ - S3C2440_GPIO_CONFIG (GPGCON, 9, GPIO_INPUT); - S3C2440_GPIO_CONFIG (GPGCON, 10, GPIO_INPUT); - S3C2440_GPIO_PULLUP (GPGUP, 9, GPIO_PULLUP_ENABLE); - S3C2440_GPIO_PULLUP (GPGUP, 10, GPIO_PULLUP_ENABLE); - - /* init touchscreen */ - touchscreen_init_device(); -} - -inline bool button_hold(void) -{ - return 0; -} - -int button_read_device(int* data) -{ - int btn = BUTTON_NONE; - static int old_data = 0; - - *data = old_data; - - /* Read the buttons - active low */ - btn = (GPGDAT & BUTTON_MAIN) ^ BUTTON_MAIN; - - /* read touchscreen */ - btn |= touchscreen_read_device(data, &old_data); - - return btn; -} - -void touchpad_set_sensitivity(int level) -{ - (void)level; - /* No touchpad */ -} - -#ifdef HAVE_HEADPHONE_DETECTION -bool headphones_inserted(void) -{ - /* No detect */ - return false; -} -#endif /* HAVE_HEADPHONE_DETECTION */ - diff --git a/firmware/target/arm/s3c2440/mini2440/button-target.h b/firmware/target/arm/s3c2440/mini2440/button-target.h deleted file mode 100644 index 685af7270f..0000000000 --- a/firmware/target/arm/s3c2440/mini2440/button-target.h +++ /dev/null @@ -1,75 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * $Id$ - * - * Copyright (C) 2009 by Bob Cousins - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ -#ifndef _BUTTON_TARGET_H_ -#define _BUTTON_TARGET_H_ - -void touchpad_set_sensitivity(int level); - -/* Mini2440 specific button codes */ - -#define BUTTON_ONE 0x0001 -#define BUTTON_TWO 0x0008 -#define BUTTON_THREE 0x0020 -#define BUTTON_FOUR 0x0040 -#define BUTTON_FIVE 0x0080 -#define BUTTON_SIX 0x0800 - -/* Add on buttons */ -#define BUTTON_SEVEN 0x0200 -#define BUTTON_EIGHT 0x0400 - -/* Touch Screen Area Buttons */ -#define BUTTON_TOPLEFT 0x010000 -#define BUTTON_TOPMIDDLE 0x020000 -#define BUTTON_TOPRIGHT 0x040000 -#define BUTTON_MIDLEFT 0x080000 -#define BUTTON_CENTER 0x100000 -#define BUTTON_MIDRIGHT 0x200000 -#define BUTTON_BOTTOMLEFT 0x400000 -#define BUTTON_BOTTOMMIDDLE 0x800000 -#define BUTTON_BOTTOMRIGHT 0x100000 - -#define BUTTON_TOUCH 0x200000 - - -#define BUTTON_MENU BUTTON_ONE -#define BUTTON_UP BUTTON_TWO -#define BUTTON_SELECT BUTTON_THREE -#define BUTTON_DOWN BUTTON_FOUR -#define BUTTON_LEFT BUTTON_FIVE -#define BUTTON_RIGHT BUTTON_SIX - -/* Add on buttons */ -#define BUTTON_A BUTTON_SEVEN -#define BUTTON_POWER BUTTON_EIGHT - -/* TODO: bodge to keep keymap-mini2440 happy */ -#define BUTTON_VOL_DOWN 0x4000 -#define BUTTON_VOL_UP 0x8000 - -#define BUTTON_MAIN (BUTTON_MENU|BUTTON_LEFT|BUTTON_RIGHT | \ - BUTTON_UP |BUTTON_DOWN|BUTTON_SELECT | \ - BUTTON_A |BUTTON_POWER ) - -#define POWEROFF_BUTTON BUTTON_MENU -#define POWEROFF_COUNT 10 - -#endif /* _BUTTON_TARGET_H_ */ diff --git a/firmware/target/arm/s3c2440/mini2440/lcd-target.h b/firmware/target/arm/s3c2440/mini2440/lcd-target.h deleted file mode 100644 index 97643f8163..0000000000 --- a/firmware/target/arm/s3c2440/mini2440/lcd-target.h +++ /dev/null @@ -1,47 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * $Id$ - * - * Copyright (C) 2009 by Bob Cousins, Lyre Project - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ -#ifndef LCD_TARGET_H -#define LCD_TARGET_H - -#define LCD_FRAMEBUF_ADDR(col, row) ((fb_data *)FRAME + (row)*LCD_WIDTH + (col)) - -/* Setup for Mini2440, 3.5" TFT LCD Touchscreen */ - -/* Config values for LCDCON1 */ -#define LCD_CLKVAL 4 -#define LCD_MMODE 0 -#define LCD_PNRMODE 3 -#define LCD_BPPMODE 12 -#define LCD_ENVID 1 - -/* Config values for LCDCON2 */ -#define LCD_UPPER_MARGIN 1 -#define LCD_LOWER_MARGIN 4 -#define LCD_VSYNC_LEN 1 - -/* Config values for LCDCON3 */ -#define LCD_RIGHT_MARGIN 0 -#define LCD_LEFT_MARGIN 25 - -/* Config values for LCDCON4 */ -#define LCD_HSYNC_LEN 4 - -#endif /* LCD_TARGET_H */ diff --git a/firmware/target/arm/s3c2440/mini2440/led-mini2440.c b/firmware/target/arm/s3c2440/mini2440/led-mini2440.c deleted file mode 100644 index 606d443184..0000000000 --- a/firmware/target/arm/s3c2440/mini2440/led-mini2440.c +++ /dev/null @@ -1,67 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * $Id$ - * - * Copyright (C) 2009 by Bob Cousins - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ -#include "config.h" -#include "cpu.h" -#include "kernel.h" -#include "led-mini2440.h" - -/* LED functions for debug */ - -void led_init (void) -{ - S3C2440_GPIO_CONFIG (GPBCON, 5, GPIO_OUTPUT); - S3C2440_GPIO_CONFIG (GPBCON, 6, GPIO_OUTPUT); - S3C2440_GPIO_CONFIG (GPBCON, 7, GPIO_OUTPUT); - S3C2440_GPIO_CONFIG (GPBCON, 8, GPIO_OUTPUT); - - S3C2440_GPIO_PULLUP (GPBUP, 5, GPIO_PULLUP_DISABLE); - S3C2440_GPIO_PULLUP (GPBUP, 6, GPIO_PULLUP_DISABLE); - S3C2440_GPIO_PULLUP (GPBUP, 7, GPIO_PULLUP_DISABLE); - S3C2440_GPIO_PULLUP (GPBUP, 8, GPIO_PULLUP_DISABLE); -} - -/* Turn on one or more LEDS */ -void set_leds (int led_mask) -{ - GPBDAT &= ~led_mask; -} - -/* Turn off one or more LEDS */ -void clear_leds (int led_mask) -{ - GPBDAT |= led_mask; -} - -/* Alternate flash pattern1 and pattern2 */ -/* Never returns */ -void led_flash (int led_pattern1, int led_pattern2) -{ - while (1) - { - set_leds (led_pattern1); - sleep(HZ/2); - clear_leds (led_pattern1); - - set_leds(led_pattern2); - sleep(HZ/2); - clear_leds (led_pattern2); - } -} diff --git a/firmware/target/arm/s3c2440/mini2440/led-mini2440.h b/firmware/target/arm/s3c2440/mini2440/led-mini2440.h deleted file mode 100644 index 0aaad1c9a4..0000000000 --- a/firmware/target/arm/s3c2440/mini2440/led-mini2440.h +++ /dev/null @@ -1,46 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * $Id$ - * - * Copyright (C) 2009 by Bob Cousins - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ - -#ifndef _LED_MINI2440_H_ -#define _LED_MINI2440_H_ - -/* LED functions for debug etc */ - -#define LED1 0x0020 /* GPB5 */ -#define LED2 0x0040 /* GPB6 */ -#define LED3 0x0080 /* GPB7 */ -#define LED4 0x0100 /* GPB8 */ - -#define LED_NONE 0x0000 -#define LED_ALL (LED1|LED2|LED3|LED4) - -void led_init (void); - -/* Turn on one or more LEDS */ -void set_leds (int led_mask); - -/* Turn off one or more LEDS */ -void clear_leds (int led_mask); - -/* Alternate flash of pattern1 and pattern2 - never returns */ -void led_flash (int led_pattern1, int led_pattern2); - -#endif /* _LED_MINI2440_H_ */ diff --git a/firmware/target/arm/s3c2440/mini2440/pcm-mini2440.c b/firmware/target/arm/s3c2440/mini2440/pcm-mini2440.c deleted file mode 100644 index 999a53e3f9..0000000000 --- a/firmware/target/arm/s3c2440/mini2440/pcm-mini2440.c +++ /dev/null @@ -1,261 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * $Id$ - * - * Copyright (C) 2006 by Michael Sevakis - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ -#include -#include "config.h" -#include "system.h" -#include "kernel.h" -#include "logf.h" -#include "audio.h" -#include "sound.h" -#include "file.h" -#include "pcm-internal.h" - -/* PCM interrupt routine lockout */ -static struct -{ - int locked; - unsigned long state; -} dma_play_lock = -{ - .locked = 0, - .state = 0, -}; - -#define FIFO_COUNT ((IISFCON >> 6) & 0x3F) - -/* Setup for the DMA controller */ -#define DMA_CONTROL_SETUP ((1<<31) | (1<<29) | (1<<23) | (1<<22) | (1<<20)) - -#ifdef HAVE_UDA1341 -/* for PCLK = 50 MHz, frame size = 32 */ -/* [prescaler, master clock rate] */ -static const unsigned char pcm_freq_parms[HW_NUM_FREQ][2] = -{ - [HW_FREQ_44] = { 2, IISMOD_MASTER_CLOCK_384FS }, - [HW_FREQ_22] = { 8, IISMOD_MASTER_CLOCK_256FS }, - [HW_FREQ_11] = { 17, IISMOD_MASTER_CLOCK_256FS }, -}; -#endif - -/* DMA count has hit zero - no more data */ -/* Get more data from the callback and top off the FIFO */ -void fiq_handler(void) __attribute__((interrupt ("FIQ"))); - -/* Mask the DMA interrupt */ -void pcm_play_lock(void) -{ - if (++dma_play_lock.locked == 1) - bitset32(&INTMSK, DMA2_MASK); -} - -/* Unmask the DMA interrupt if enabled */ -void pcm_play_unlock(void) -{ - if (--dma_play_lock.locked == 0) - bitclr32(&INTMSK, dma_play_lock.state); -} - -void pcm_play_dma_init(void) -{ - /* There seem to be problems when changing the IIS interface configuration - * when a clock is not present. - */ - bitset32(&CLKCON, 1<<17); - -#ifdef HAVE_UDA1341 - /* master, transmit mode, 16 bit samples, BCLK 32fs, PCLK */ - IISMOD = IISMOD_MASTER_CLOCK_PCLK | IISMOD_MASTER_MODE | IISMOD_TRANSMIT_MODE - | IISMOD_16_BIT | IISMOD_MASTER_CLOCK_256FS | IISMOD_BIT_CLOCK_32FS; - - /* TX idle, enable prescaler */ - IISCON |= IISCON_TX_IDLE | IISCON_IIS_PRESCALER_ENABLE; -#else - /* slave, transmit mode, 16 bit samples - MCLK 384fs - use 16.9344Mhz - - BCLK 32fs */ - IISMOD = (1<<9) | (1<<8) | (2<<6) | (1<<3) | (1<<2) | (1<<0); - - /* RX,TX off,on */ - IISCON |= (1<<3) | (1<<2); -#endif - - bitclr32(&CLKCON, 1<<17); - - audiohw_init(); - - /* init GPIO */ -#ifdef GIGABEAT_F -/* GPCCON = (GPCCON & ~(3<<14)) | (1<<14); */ - S3C244_GPIO_CONFIG (GPCCON, 7, GPIO_OUTPUT); - GPCDAT |= (1<<7); -#endif - - /* GPE4=I2SDO, GPE3=I2SDI, GPE2=CDCLK, GPE1=I2SSCLK, GPE0=I2SLRCK */ - GPECON = (GPECON & ~0x3ff) | 0x2aa; - - /* Do not service DMA requests, yet */ - - /* clear any pending int and mask it */ - bitset32(&INTMSK, DMA2_MASK); - SRCPND = DMA2_MASK; - - /* connect to FIQ */ - bitset32(&INTMOD, DMA2_MASK); -} - -void pcm_play_dma_postinit(void) -{ - audiohw_postinit(); -} - -void pcm_dma_apply_settings(void) -{ -#ifdef HAVE_UDA1341 - unsigned int reg_val; - /* set prescaler and master clock rate according to freq */ - reg_val = (pcm_freq_parms [pcm_fsel][0] << 5) | pcm_freq_parms [pcm_fsel][0]; - - IISMOD = (IISMOD & ~IISMOD_MASTER_CLOCK_384FS) | pcm_freq_parms [pcm_fsel][1] ; - IISPSR = reg_val; -#endif - - audiohw_set_frequency(pcm_fsel); -} - -/* Connect the DMA and start filling the FIFO */ -static void play_start_pcm(void) -{ - /* clear pending DMA interrupt */ - SRCPND = DMA2_MASK; - - /* Flush any pending writes */ - commit_dcache_range((char*)DISRC2-0x30000000, (DCON2 & 0xFFFFF) * 2); - - /* unmask DMA interrupt when unlocking */ - dma_play_lock.state = DMA2_MASK; - - /* turn on the request */ - IISCON |= (1<<5); - - /* Activate the channel */ - DMASKTRIG2 = 0x2; - - /* turn off the idle */ - IISCON &= ~(1<<3); - -#ifdef HAVE_UDA1341 - IISMOD = (IISMOD & ~IISMOD_MASTER_CLOCK_384FS) | pcm_freq_parms [pcm_fsel][1] ; - IISPSR = (pcm_freq_parms [pcm_fsel][0] << 5) | pcm_freq_parms [pcm_fsel][0]; -#endif - - /* start the IIS */ - IISCON |= (1<<0); -} - -/* Disconnect the DMA and wait for the FIFO to clear */ -static void play_stop_pcm(void) -{ - /* Mask DMA interrupt */ - bitset32(&INTMSK, DMA2_MASK); - - /* De-Activate the DMA channel */ - DMASKTRIG2 = 0x4; - - /* are we playing? wait for the chunk to finish */ - if (dma_play_lock.state != 0) - { - /* wait for the FIFO to empty and DMA to stop */ - while ((IISCON & (1<<7)) || (DMASKTRIG2 & 0x2)); - } - - /* Keep interrupt masked when unlocking */ - dma_play_lock.state = 0; - - /* turn off the request */ - IISCON &= ~(1<<5); - - /* turn on the idle */ - IISCON |= (1<<3); - - /* stop the IIS */ - IISCON &= ~(1<<0); -} - -void pcm_play_dma_start(const void *addr, size_t size) -{ - /* Enable the IIS clock */ - bitset32(&CLKCON, 1<<17); - - /* stop any DMA in progress - idle IIS */ - play_stop_pcm(); - - /* connect DMA to the FIFO and enable the FIFO */ - IISFCON = (1<<15) | (1<<13); - - /* set DMA dest */ - DIDST2 = (unsigned int)&IISFIFO; - - /* IIS is on the APB bus, INT when TC reaches 0, fixed dest addr */ - DIDSTC2 = 0x03; - - /* set DMA source and options */ - DISRC2 = (unsigned int)addr + 0x30000000; - /* How many transfers to make - we transfer half-word at a time = 2 bytes */ - /* DMA control: CURR_TC int, single service mode, I2SSDO int, HW trig */ - /* no auto-reload, half-word (16bit) */ - DCON2 = DMA_CONTROL_SETUP | (size / 2); - DISRCC2 = 0x00; /* memory is on AHB bus, increment addresses */ - - play_start_pcm(); -} - -/* Promptly stop DMA transfers and stop IIS */ -void pcm_play_dma_stop(void) -{ - play_stop_pcm(); - - /* Disconnect the IIS clock */ - bitclr32(&CLKCON, 1<<17); -} - -void fiq_handler(void) -{ - static const void *start; - static size_t size; - - /* clear any pending interrupt */ - SRCPND = DMA2_MASK; - - /* Buffer empty. Try to get more. */ - if (!pcm_play_dma_complete_callback(PCM_DMAST_OK, &start, &size)) - return; - - /* Flush any pending cache writes */ - commit_dcache_range(start, size); - - /* set the new DMA values */ - DCON2 = DMA_CONTROL_SETUP | (size >> 1); - DISRC2 = (unsigned int)start + 0x30000000; - - /* Re-Activate the channel */ - DMASKTRIG2 = 0x2; - - pcm_play_dma_status_callback(PCM_DMAST_STARTED); -} diff --git a/firmware/target/arm/s3c2440/mini2440/power-mini2440.c b/firmware/target/arm/s3c2440/mini2440/power-mini2440.c deleted file mode 100644 index d4b00751e0..0000000000 --- a/firmware/target/arm/s3c2440/mini2440/power-mini2440.c +++ /dev/null @@ -1,55 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * $Id$ - * - * Copyright (C) 2009 by Bob Cousins - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ -#include "config.h" -#include "cpu.h" -#include -#include -#include "kernel.h" -#include "system.h" -#include "power.h" -#include "led-mini2440.h" - -void power_init(void) -{ - /* Nothing to do */ -} - -unsigned int power_input_status(void) -{ - unsigned int status = 0; - - /* Always on*/ - status = POWER_INPUT_MAIN; - return status; -} - -/* Returns true if the unit is charging the batteries. */ -bool charging_state(void) -{ - return false; -} - -void power_off(void) -{ - /* we don't have any power control, user must do it */ - led_flash (LED_NONE, LED_ALL); - while (1); -} diff --git a/firmware/target/arm/s3c2440/mini2440/powermgmt-mini2440.c b/firmware/target/arm/s3c2440/mini2440/powermgmt-mini2440.c deleted file mode 100644 index 2838c7a74a..0000000000 --- a/firmware/target/arm/s3c2440/mini2440/powermgmt-mini2440.c +++ /dev/null @@ -1,64 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * $Id$ - * - * Copyright (C) 2009 by Bob Cousins - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ -#include "config.h" -#include "system.h" -#include "adc.h" -#include "power.h" -#include "powermgmt.h" - -/* The following constants are dummy values since there is no battery */ -unsigned short battery_level_disksafe = 3450; - -unsigned short battery_level_shutoff = 3400; - -/* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ -unsigned short percent_to_volt_discharge[11] = -{ - /* Typical Li Ion 830mAH */ - 3480, 3550, 3590, 3610, 3630, 3650, 3700, 3760, 3800, 3910, 3990 -}; - -/* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */ -unsigned short percent_to_volt_charge[11] = -{ - /* Typical Li Ion 830mAH */ - 3480, 3550, 3590, 3610, 3630, 3650, 3700, 3760, 3800, 3910, 3990 -}; - - -/* Returns battery voltage from ADC [millivolts] */ -/* full-scale (2^10) in millivolt */ -int _battery_voltage(void) -{ - /* Since we have no battery, return a fully charged value */ - return 4000 * 1024 / 1000; -} - -#ifdef HAVE_BATTERY_SWITCH -unsigned int input_millivolts(void) -{ - unsigned int batt_millivolts = battery_voltage(); - - /* No battery, return nominal value */ - return batt_millivolts; -} -#endif /* HAVE_BATTERY_SWITCH */ - diff --git a/firmware/target/arm/s3c2440/mini2440/touchscreen-mini2440.c b/firmware/target/arm/s3c2440/mini2440/touchscreen-mini2440.c deleted file mode 100644 index 4ab4a46351..0000000000 --- a/firmware/target/arm/s3c2440/mini2440/touchscreen-mini2440.c +++ /dev/null @@ -1,189 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___void - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * $Id$ - * - * Copyright (C) 2008 by Rob Purchase - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ - -#include "config.h" -#include "touchscreen-target.h" -#include "adc-target.h" -#include "system.h" -#include "stdlib.h" -#include "button.h" -#include "tick.h" -#include "touchscreen.h" - -#define NO_OF_TOUCH_DATA 5 - -struct touch_calibration_point { - short px_x; /* known pixel value */ - short px_y; - short val_x; /* touchscreen value at the known pixel */ - short val_y; -}; - -static struct touch_calibration_point topleft, bottomright; - -static bool touch_available = false; - -static short x[NO_OF_TOUCH_DATA], y[NO_OF_TOUCH_DATA]; - -/* comparator for qsort */ -static int short_cmp(const void *a, const void *b) -{ - return *(short*)a - *(short*)b; -} - -static int touch_to_pixels(short val_x, short val_y) -{ - short x,y; - - x=val_x; - y=val_y; - - x = (x-topleft.val_x)*(bottomright.px_x - topleft.px_x) - / (bottomright.val_x - topleft.val_x) + topleft.px_x; - - y = (y-topleft.val_y)*(bottomright.px_y - topleft.px_y) - / (bottomright.val_y - topleft.val_y) + topleft.px_y; - - if (x < 0) - x = 0; - else if (x>=LCD_WIDTH) - x=LCD_WIDTH-1; - - if (y < 0) - y = 0; - else if (y>=LCD_HEIGHT) - y=LCD_HEIGHT-1; - - return (x<<16)|y; -} - -void touchscreen_init_device() -{ - /* set touchscreen adc controller into wait for interrupt mode */ - ADCTSC = 0xd3; /* Wfait,XP-PU,XP_DIS,XM_DIS,YP_dis,YM_end */ - - /* Arbitrary touchscreen calibration */ - topleft.px_x = 0; - topleft.px_y = 0; - topleft.val_x = 105; - topleft.val_y = 925; - - bottomright.px_x = LCD_WIDTH; - bottomright.px_y = LCD_HEIGHT; - bottomright.val_x = 890; - bottomright.val_y = 105; - - touch_available = false; -} - -void touchscreen_scan_device() -{ - static long last_touch_read = 0; - static int touch_data_index = 0; - - int saveADCDLY; - - /* check touch state */ - if(ADCDAT1 & (1<<15)) - { - return; - } - - if (TIME_AFTER(current_tick, last_touch_read + 1)) - { - /* resets the index if the last touch could not be read 5 times */ - touch_data_index = 0; - } - - /* read touch data */ - saveADCDLY = ADCDLY; - ADCDLY = 40000; /*delay ~0.8ms (1/50M)*4000 */ - ADCTSC = (1<<3)|(1<<2); /* pullup disable, seq x,y pos measure */ - /* start adc */ - ADCCON|= 0x1; - /* wait for start and end */ - while(ADCCON & 0x1); - while(!(ADCCON & 0x8000)); - - x[touch_data_index] = ADCDAT0&0x3ff; - y[touch_data_index] = ADCDAT1&0x3ff; - - ADCTSC = 0xd3; /* back to interrupt mode */ - ADCDLY = saveADCDLY; - - touch_data_index++; - - if (touch_data_index > NO_OF_TOUCH_DATA - 1) - { - /* coordinates 5 times read */ - touch_available = true; - touch_data_index = 0; - } - last_touch_read = current_tick; -} - -int touchscreen_read_device(int *data, int *old_data) -{ - int btn = BUTTON_NONE; - static bool touch_hold = false; - static long last_touch = 0; - - if (touch_available || touch_hold) - { - short x_touch, y_touch; - static short last_x = 0, last_y = 0; - - if (touch_hold) - { - /* get rid of very fast unintended double touches */ - x_touch = last_x; - y_touch = last_y; - } - else - { - /* sort the 5 data taken and use the median value */ - qsort(x, NO_OF_TOUCH_DATA, sizeof(short), short_cmp); - qsort(y, NO_OF_TOUCH_DATA, sizeof(short), short_cmp); - - x_touch = last_x = x[(NO_OF_TOUCH_DATA - 1)/2]; - y_touch = last_y = y[(NO_OF_TOUCH_DATA - 1)/2]; - - last_touch = current_tick; - - touch_hold = true; - touch_available = false; - } - - *old_data = *data = touch_to_pixels(x_touch, y_touch); - - btn |= touchscreen_to_pixels((*data&0xffff0000) >> 16, - (*data&0x0000ffff), - data); - } - - if (TIME_AFTER(current_tick, last_touch + 10)) - { - /* put the touchscreen back into interrupt mode */ - touch_hold = false; - } - - return btn; -} diff --git a/firmware/target/arm/s3c2440/mini2440/touchscreen-target.h b/firmware/target/arm/s3c2440/mini2440/touchscreen-target.h deleted file mode 100644 index 1019a98330..0000000000 --- a/firmware/target/arm/s3c2440/mini2440/touchscreen-target.h +++ /dev/null @@ -1,33 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * $Id$ - * - * Copyright (C) 2009 by Dominik Wenger - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ - -#ifndef _TOUCHSCREEN_TARGET_H -#define _TOUCHSCREEN_TARGET_H - -/* try to get a touchscreen reading from adc */ -void touchscreen_scan_device(void); -/* init touchscreen driver */ -void touchscreen_init_device(void); - -int touchscreen_read_device(int *data, int *old_data); - -#endif - diff --git a/firmware/target/arm/s3c2440/system-s3c2440.c b/firmware/target/arm/s3c2440/system-s3c2440.c index 569dcabdbe..b9c6dd5879 100644 --- a/firmware/target/arm/s3c2440/system-s3c2440.c +++ b/firmware/target/arm/s3c2440/system-s3c2440.c @@ -191,8 +191,6 @@ void system_init(void) CLKCON &= ~0xFF1ED0; CLKSLOW |= 0x80; -#elif defined(MINI2440) - /* TODO: anything? */ #else #error Unknown target #endif diff --git a/firmware/target/arm/s3c2440/system-target.h b/firmware/target/arm/s3c2440/system-target.h index 33662cd9e5..e69998f4b9 100644 --- a/firmware/target/arm/s3c2440/system-target.h +++ b/firmware/target/arm/s3c2440/system-target.h @@ -48,20 +48,6 @@ #define UNCACHED_ADDR(a) ((typeof(a))((unsigned int)(a) | UNCACHED_BASE_ADDR )) #endif /* BOOTLOADER */ -#elif defined(MINI2440) - - /* Uses 1:4:8 */ - #define FCLK 406000000 - #define HCLK (FCLK/4) /* = 101,250,000 */ - #define PCLK (HCLK/2) /* = 50,625,000 */ - - #define CPUFREQ_DEFAULT FCLK /* 406 MHz */ - #define CPUFREQ_NORMAL (FCLK/4)/* 101.25 MHz */ - #define CPUFREQ_MAX FCLK /* 406 MHz */ - - #define UNCACHED_BASE_ADDR 0x30000000 - #define UNCACHED_ADDR(a) ((typeof(a))((unsigned int)(a) | UNCACHED_BASE_ADDR )) - #else #error Unknown target #endif diff --git a/firmware/target/hosted/sdl/sim-ui-defines.h b/firmware/target/hosted/sdl/sim-ui-defines.h index 8de6ce93cd..5a404736b4 100644 --- a/firmware/target/hosted/sdl/sim-ui-defines.h +++ b/firmware/target/hosted/sdl/sim-ui-defines.h @@ -346,13 +346,6 @@ #define UI_LCD_POSX 124 /* x position of lcd */ #define UI_LCD_POSY 42 /* y position of lcd */ -#elif defined(MINI2440) -#define UI_TITLE "Mini2440" -#define UI_WIDTH 441 /* width of GUI window */ -#define UI_HEIGHT 436 /* height of GUI window */ -#define UI_LCD_POSX 148 /* x position of lcd */ -#define UI_LCD_POSY 50 /* y position of lcd */ - #elif defined(PBELL_VIBE500) #define UI_TITLE "Packard Bell Vibe 500" #define UI_WIDTH 287 /* width of GUI window */ diff --git a/manual/rockbox_interface/images/mini2440-front.svg b/manual/rockbox_interface/images/mini2440-front.svg deleted file mode 100644 index 12aa85ab4c..0000000000 --- a/manual/rockbox_interface/images/mini2440-front.svg +++ /dev/null @@ -1,1466 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tools/builds.pm b/tools/builds.pm index 02a4b6fea8..157720a0d8 100644 --- a/tools/builds.pm +++ b/tools/builds.pm @@ -199,14 +199,6 @@ $releasenotes="/wiki/ReleaseNotes400"; name => 'iriver H320/340', status => 3, }, - 'lyreproto1' => { - name => 'Lyre Prototype 1', - status => 1, - }, - 'mini2440' => { - name => 'Mini 2440', - status => 1, - }, 'mrobe100' => { name => 'Olympus M-Robe 100', status => 3, diff --git a/tools/configure b/tools/configure index 1e44235cb3..b1260d88c2 100755 --- a/tools/configure +++ b/tools/configure @@ -1697,41 +1697,41 @@ cat <