Send commitlog mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.openmoko.org/mailman/listinfo/commitlog
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of commitlog digest..."
Today's Topics:
1. r1285 - trunk/src/target/u-boot/patches ([EMAIL PROTECTED])
2. r1286 - trunk/src/target/u-boot/patches ([EMAIL PROTECTED])
3. r1287 - trunk/src/target/u-boot/patches ([EMAIL PROTECTED])
4. r1288 - trunk/src/target/kernel/patches
([EMAIL PROTECTED])
5. r1289 - in trunk/oe/packages/uucp: . files
([EMAIL PROTECTED])
6. r1290 - in trunk/oe/packages: . upstart
([EMAIL PROTECTED])
7. r1291 - trunk/src/target/u-boot/patches ([EMAIL PROTECTED])
--- Begin Message ---
Author: werner
Date: 2007-03-08 23:44:17 +0100 (Thu, 08 Mar 2007)
New Revision: 1285
Modified:
trunk/src/target/u-boot/patches/boot-menu.patch
Log:
board/neo1973/bootmenu.c (init_bootmenu, bootmenu_hook): evaluate
"boot_menu_timeout" on every timer tick, so change from concurrent console is
picked up without a menu restart
Modified: trunk/src/target/u-boot/patches/boot-menu.patch
===================================================================
--- trunk/src/target/u-boot/patches/boot-menu.patch 2007-03-08 22:27:48 UTC
(rev 1284)
+++ trunk/src/target/u-boot/patches/boot-menu.patch 2007-03-08 22:44:17 UTC
(rev 1285)
@@ -22,7 +22,7 @@
===================================================================
--- /dev/null
+++ u-boot/board/neo1973/bootmenu.c
-@@ -0,0 +1,365 @@
+@@ -0,0 +1,366 @@
+/*
+ * bootmenu.c - Boot menu
+ *
@@ -100,7 +100,6 @@
+static int map[MAX_MENU_ITEMS];
+static int options = 0;
+static int width = sizeof(FACTORY_TXT)-1;
-+static int boot_menu_timeout;
+
+static device_t *bm_con;
+
@@ -233,11 +232,6 @@
+ map[options+1] = options+1;
+
+ bm_printf("\n\nPress [AUX] to select, [POWER] to execute.\n");
-+
-+ boot_menu_timeout = get_var_positive_int("boot_menu_timeout",
-+ BOOT_MENU_TIMEOUT);
-+ if (boot_menu_timeout < MIN_BOOT_MENU_TIMEOUT)
-+ boot_menu_timeout = MIN_BOOT_MENU_TIMEOUT;
+}
+
+
@@ -349,11 +343,18 @@
+ seconds = 0;
+ }
+ on = tmp;
-+ if (neo1973_new_second())
-+ if (++seconds > boot_menu_timeout) {
++ if (neo1973_new_second()) {
++ int timeout;
++
++ timeout = get_var_positive_int("boot_menu_timeout",
++ BOOT_MENU_TIMEOUT);
++ if (timeout < MIN_BOOT_MENU_TIMEOUT)
++ timeout = MIN_BOOT_MENU_TIMEOUT;
++ if (++seconds > timeout) {
+ poweroff_if_idle();
+ seconds = 0;
+ }
++ }
+}
+
+
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2007-03-08 23:54:58 +0100 (Thu, 08 Mar 2007)
New Revision: 1286
Modified:
trunk/src/target/u-boot/patches/boot-menu.patch
Log:
board/neo1973/bootmenu.c (init_bootmenu): print version_string above everything
else
board/neo1973/bootmenu.c: added constants TOP_ROW and MENU_0_ROW to define
screen layout
Modified: trunk/src/target/u-boot/patches/boot-menu.patch
===================================================================
--- trunk/src/target/u-boot/patches/boot-menu.patch 2007-03-08 22:44:17 UTC
(rev 1285)
+++ trunk/src/target/u-boot/patches/boot-menu.patch 2007-03-08 22:54:58 UTC
(rev 1286)
@@ -22,7 +22,7 @@
===================================================================
--- /dev/null
+++ u-boot/board/neo1973/bootmenu.c
-@@ -0,0 +1,366 @@
+@@ -0,0 +1,375 @@
+/*
+ * bootmenu.c - Boot menu
+ *
@@ -61,6 +61,9 @@
+#include "neo1973.h"
+
+
++extern const char version_string[];
++
++
+#define ANSI_CLEAR "\e[2J"
+#define ANSI_REVERSE "\e[7m"
+#define ANSI_NORMAL "\e[m"
@@ -77,6 +80,9 @@
+#define AFTER_COMMAND_WAIT 3 /* wait (2,3] after running commands */
+#define MAX_MENU_ITEMS 10 /* cut off after that many */
+
++#define TOP_ROW 2
++#define MENU_0_ROW (TOP_ROW+5)
++
+#define BOOT_TXT "Boot"
+#define FACTORY_TXT "Factory reset"
+
@@ -170,7 +176,7 @@
+
+static void print_option(int n, int reverse)
+{
-+ bm_printf(ANSI_GOTOYX, n+4, 1);
++ bm_printf(ANSI_GOTOYX, MENU_0_ROW+n, 1);
+ if (reverse)
+ bm_printf(ANSI_REVERSE);
+ print_option_n(n);
@@ -211,7 +217,10 @@
+{
+ int n;
+
-+ bm_printf(ANSI_CLEAR ANSI_GOTOYX "*** BOOT MENU ***\n\n", 2, 1);
++ bm_printf(ANSI_CLEAR ANSI_GOTOYX "%s", TOP_ROW, 1, version_string);
++ bm_printf(ANSI_GOTOYX "*** BOOT MENU ***", TOP_ROW+3, 1);
++ bm_printf(ANSI_GOTOYX, MENU_0_ROW, 1);
++
+ options = 0;
+
+ /* hard-coded first option */
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2007-03-09 00:00:37 +0100 (Fri, 09 Mar 2007)
New Revision: 1287
Modified:
trunk/src/target/u-boot/patches/boot-menu.patch
Log:
board/neo1973/neo1973.h, board/neo1973/neo1973.c, board/neo1973/bootmenu.c:
renamed neo1973_911_key_pressed to neo1973_aux_key_pressed
Modified: trunk/src/target/u-boot/patches/boot-menu.patch
===================================================================
--- trunk/src/target/u-boot/patches/boot-menu.patch 2007-03-08 22:54:58 UTC
(rev 1286)
+++ trunk/src/target/u-boot/patches/boot-menu.patch 2007-03-08 23:00:37 UTC
(rev 1287)
@@ -15,6 +15,8 @@
boot, reset, or unknown cause
board/neo1973/neo1973.c (board_late_init): don't look for the power key if
woken up by the charger
+board/neo1973/neo1973.h, board/neo1973/neo1973.c, board/neo1973/bootmenu.c:
+ renamed neo1973_911_key_pressed to neo1973_aux_key_pressed
- Werner Almesberger <[EMAIL PROTECTED]>
@@ -313,7 +315,7 @@
+ while (seconds) {
+ int tmp;
+
-+ tmp = debounce(neo1973_911_key_pressed, aux);
++ tmp = debounce(neo1973_aux_key_pressed, aux);
+ if (tmp && !aux)
+ break;
+ aux = tmp;
@@ -335,7 +337,7 @@
+
+ if (activity)
+ seconds = 0;
-+ tmp = debounce(neo1973_911_key_pressed, aux);
++ tmp = debounce(neo1973_aux_key_pressed, aux);
+ if (tmp && !aux) {
+ print_option(option, 0);
+ option++;
@@ -471,7 +473,7 @@
+
+ while (neo1973_wakeup_cause == NEO1973_WAKEUP_RESET ||
+ neo1973_on_key_pressed()) {
-+ if (neo1973_911_key_pressed())
++ if (neo1973_aux_key_pressed())
+ menu_vote++;
+ else
+ menu_vote--;
@@ -498,10 +500,11 @@
return 0;
}
-@@ -313,6 +319,16 @@ void neo1973_vibrator(int on)
+@@ -313,7 +319,17 @@ void neo1973_vibrator(int on)
gpio->GPBDAT &= ~(1 << 10);
}
+-int neo1973_911_key_pressed(void)
+int neo1973_new_second(void)
+{
+ return pcf50606_reg_read(PCF50606_REG_INT1) & PCF50606_INT1_SECOND;
@@ -512,9 +515,10 @@
+ return !(pcf50606_reg_read(PCF50606_REG_OOCS) & PFC50606_OOCS_ONKEY);
+}
+
- int neo1973_911_key_pressed(void)
++int neo1973_aux_key_pressed(void)
{
S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO();
+ if (gpio->GPFDAT & (1 << 6))
Index: u-boot/board/neo1973/Makefile
===================================================================
--- u-boot.orig/board/neo1973/Makefile
@@ -538,7 +542,7 @@
+int neo1973_new_second(void);
+int neo1973_on_key_pressed(void);
-+int neo1973_911_key_pressed(void);
++int neo1973_aux_key_pressed(void);
+
+void bootmenu(void);
+
--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-03-09 00:08:51 +0100 (Fri, 09 Mar 2007)
New Revision: 1288
Modified:
trunk/src/target/kernel/patches/gta01-power_control.patch
Log:
* build gta01-pm-* modules into kernel image
* make sure we stop the console on /dev/ttySAC0 if we switch to GSM mode
Modified: trunk/src/target/kernel/patches/gta01-power_control.patch
===================================================================
--- trunk/src/target/kernel/patches/gta01-power_control.patch 2007-03-08
23:00:37 UTC (rev 1287)
+++ trunk/src/target/kernel/patches/gta01-power_control.patch 2007-03-08
23:08:51 UTC (rev 1288)
@@ -1,17 +1,16 @@
Index: linux-2.6.20.1/arch/arm/common/Makefile
===================================================================
---- linux-2.6.20.1.orig/arch/arm/common/Makefile 2007-03-02
20:53:59.000000000 +0100
-+++ linux-2.6.20.1/arch/arm/common/Makefile 2007-03-02 20:54:56.000000000
+0100
-@@ -17,3 +17,5 @@
+--- linux-2.6.20.1.orig/arch/arm/common/Makefile 2007-03-08
14:03:22.000000000 +0100
++++ linux-2.6.20.1/arch/arm/common/Makefile 2007-03-08 23:12:20.000000000
+0100
+@@ -17,3 +17,4 @@
obj-$(CONFIG_SHARP_SCOOP) += scoop.o
obj-$(CONFIG_ARCH_IXP2000) += uengine.o
obj-$(CONFIG_ARCH_IXP23XX) += uengine.o
-+#obj-$(CONFIG_MACH_GTA01) += gta01_pm_gsm.o gta01_pm_gps.o gta01_pm_bt.o
-+obj-m += gta01_pm_gsm.o gta01_pm_gps.o
gta01_pm_bt.o
++obj-$(CONFIG_MACH_GTA01) += gta01_pm_gsm.o gta01_pm_gps.o gta01_pm_bt.o
Index: linux-2.6.20.1/arch/arm/common/gta01_pm_gps.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.20.1/arch/arm/common/gta01_pm_gps.c 2007-03-02
20:54:56.000000000 +0100
++++ linux-2.6.20.1/arch/arm/common/gta01_pm_gps.c 2007-03-08
14:03:27.000000000 +0100
@@ -0,0 +1,542 @@
+/*
+ * GPS Power Management code for the FIC Neo1973 GSM Phone
@@ -558,8 +557,8 @@
Index: linux-2.6.20.1/arch/arm/common/gta01_pm_gsm.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.20.1/arch/arm/common/gta01_pm_gsm.c 2007-03-03
15:39:15.000000000 +0100
-@@ -0,0 +1,174 @@
++++ linux-2.6.20.1/arch/arm/common/gta01_pm_gsm.c 2007-03-08
23:48:57.000000000 +0100
+@@ -0,0 +1,208 @@
+/*
+ * GSM Management code for the FIC Neo1973 GSM Phone
+ *
@@ -577,16 +576,35 @@
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/platform_device.h>
++#include <linux/console.h>
++#include <linux/errno.h>
+
+#include <asm/hardware.h>
+#include <asm/arch/gta01.h>
+
+struct gta01pm_priv {
+ int gpio_ngsm_en;
++ struct console *con;
+};
+
+static struct gta01pm_priv gta01_gsm;
+
++static struct console *find_s3c24xx_console(void)
++{
++ struct console *con;
++
++ acquire_console_sem();
++
++ for (con = console_drivers; con; con = con->next) {
++ if (!strcmp(con->name, "ttySAC"))
++ break;
++ }
++
++ release_console_sem();
++
++ return con;
++}
++
+static ssize_t gsm_read(struct device *dev, struct device_attribute *attr,
+ char *buf)
+{
@@ -616,6 +634,9 @@
+ dev_info(dev, "powering up GSM, thus disconnecting "
+ "serial console\n");
+
++ if (gta01_gsm.con)
++ console_stop(gta01_gsm.con);
++
+ if (gta01_gsm.gpio_ngsm_en)
+ s3c2410_gpio_setpin(gta01_gsm.gpio_ngsm_en, 0);
+
@@ -626,6 +647,9 @@
+ if (gta01_gsm.gpio_ngsm_en)
+ s3c2410_gpio_setpin(gta01_gsm.gpio_ngsm_en, 1);
+
++ if (gta01_gsm.con)
++ console_start(gta01_gsm.con);
++
+ dev_info(dev, "powered down GSM, thus enabling "
+ "serial console\n");
+ }
@@ -656,6 +680,11 @@
+ /* GPIO state is saved/restored by S3C2410 core GPIO driver, so we
+ * don't need to do anything here */
+
++ /* Make sure that the kernel console on the serial port is still
++ * disabled. FIXME: resume ordering race with serial driver! */
++ if (s3c2410_gpio_getpin(GTA01_GPIO_MODEM_ON) && gta01_gsm.con)
++ console_stop(gta01_gsm.con);
++
+ return 0;
+}
+#else
@@ -696,6 +725,10 @@
+ break;
+ }
+
++ gta01_gsm.con = find_s3c24xx_console();
++ if (!gta01_gsm.con)
++ dev_warn(&pdev->dev, "cannot find S3C24xx console driver\n");
++
+ return 0;
+}
+
@@ -737,7 +770,7 @@
Index: linux-2.6.20.1/arch/arm/common/gta01_pm_bt.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.20.1/arch/arm/common/gta01_pm_bt.c 2007-03-02
20:54:56.000000000 +0100
++++ linux-2.6.20.1/arch/arm/common/gta01_pm_bt.c 2007-03-08
14:03:27.000000000 +0100
@@ -0,0 +1,133 @@
+/*
+ * Bluetooth PM code for the FIC Neo1973 GSM Phone
--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-03-09 00:59:54 +0100 (Fri, 09 Mar 2007)
New Revision: 1289
Added:
trunk/oe/packages/uucp/files/
trunk/oe/packages/uucp/files/policy.patch
Modified:
trunk/oe/packages/uucp/uucp_1.07.bb
Log:
provide a more reasonable policy.h file
Added: trunk/oe/packages/uucp/files/policy.patch
===================================================================
--- trunk/oe/packages/uucp/files/policy.patch 2007-03-08 23:08:51 UTC (rev
1288)
+++ trunk/oe/packages/uucp/files/policy.patch 2007-03-08 23:59:54 UTC (rev
1289)
@@ -0,0 +1,85 @@
+Index: uucp-1.07/policy.h
+===================================================================
+--- uucp-1.07.orig/policy.h 2003-05-29 06:08:45.000000000 +0000
++++ uucp-1.07/policy.h 2007-03-09 00:51:55.000000000 +0000
+@@ -240,7 +240,7 @@
+ the sendmail choice below. Otherwise, select one of the other
+ choices as appropriate. */
+ #if 1
+-#define MAIL_PROGRAM "/usr/lib/sendmail -t"
++#define MAIL_PROGRAM "/usr/sbin/sendmail -oi -t"
+ /* #define MAIL_PROGRAM "/usr/sbin/sendmail -t" */
+ #define MAIL_PROGRAM_TO_BODY 1
+ #define MAIL_PROGRAM_SUBJECT_BODY 1
+@@ -302,7 +302,7 @@
+ /* #define LOCKDIR "/usr/spool/locks" */
+ /* #define LOCKDIR "/usr/spool/uucp/LCK" */
+ /* #define LOCKDIR "/var/spool/lock" */
+-/* #define LOCKDIR "/var/lock" */
++#define LOCKDIR "/var/lock"
+
+ /* You must also specify the format of the lock files by setting
+ exactly one of the following macros to 1. Check an existing lock
+@@ -349,7 +349,7 @@
+ The format for QNX lock files was made up just for Taylor UUCP.
+ QNX doesn't come with a version of UUCP. */
+ #define HAVE_V2_LOCKFILES 0
+-#define HAVE_HDB_LOCKFILES 0
++#define HAVE_HDB_LOCKFILES 1
+ #define HAVE_SCO_LOCKFILES 0
+ #define HAVE_SVR4_LOCKFILES 0
+ #define HAVE_SEQUENT_LOCKFILES 0
+@@ -466,8 +466,8 @@
+ When looking something up (a system, a port, etc.) the new style
+ configuration files will be read first, followed by the V2
+ configuration files, followed by the HDB configuration files. */
+-#define HAVE_V2_CONFIG 0
+-#define HAVE_HDB_CONFIG 0
++#define HAVE_V2_CONFIG 1
++#define HAVE_HDB_CONFIG 1
+
+ /* Exactly one of the following macros must be set to 1. The exact
+ format of the spool directories is explained in unix/spool.c.
+@@ -572,7 +572,7 @@
+ /* The name of the default spool directory. If HAVE_TAYLOR_CONFIG is
+ set to 1, this may be overridden by the ``spool'' command in the
+ configuration file. */
+-#define SPOOLDIR "/usr/spool/uucp"
++#define SPOOLDIR "/var/spool/uucp"
+ /* #define SPOOLDIR "/var/spool/uucp" */
+
+ /* The name of the default public directory. If HAVE_TAYLOR_CONFIG is
+@@ -580,7 +580,7 @@
+ configuration file. Also, a particular system may be given a
+ specific public directory by using the ``pubdir'' command in the
+ system file. */
+-#define PUBDIR "/usr/spool/uucppublic"
++#define PUBDIR "/var/spool/uucppublic"
+ /* #define PUBDIR "/var/spool/uucppublic" */
+
+ /* The default command path. This is a space separated list of
+@@ -644,21 +644,21 @@
+ /* The default log file when using HAVE_TAYLOR_LOGGING. When using
+ HAVE_TAYLOR_CONFIG, this may be overridden by the ``logfile''
+ command in the configuration file. */
+-#define LOGFILE "/usr/spool/uucp/Log"
++#define LOGFILE "/var/spool/uucp/Log"
+ /* #define LOGFILE "/var/spool/uucp/Log" */
+ /* #define LOGFILE "/var/log/uucp/Log" */
+
+ /* The default statistics file when using HAVE_TAYLOR_LOGGING. When
+ using HAVE_TAYLOR_CONFIG, this may be overridden by the
+ ``statfile'' command in the configuration file. */
+-#define STATFILE "/usr/spool/uucp/Stats"
++#define STATFILE "/var/spool/uucp/Stats"
+ /* #define STATFILE "/var/spool/uucp/Stats" */
+ /* #define STATFILE "/var/log/uucp/Stats" */
+
+ /* The default debugging file when using HAVE_TAYLOR_LOGGING. When
+ using HAVE_TAYLOR_CONFIG, this may be overridden by the
+ ``debugfile'' command in the configuration file. */
+-#define DEBUGFILE "/usr/spool/uucp/Debug"
++#define DEBUGFILE "/var/spool/uucp/Debug"
+ /* #define DEBUGFILE "/var/spool/uucp/Debug" */
+ /* #define DEBUGFILE "/var/log/uucp/Debug" */
+
Modified: trunk/oe/packages/uucp/uucp_1.07.bb
===================================================================
--- trunk/oe/packages/uucp/uucp_1.07.bb 2007-03-08 23:08:51 UTC (rev 1288)
+++ trunk/oe/packages/uucp/uucp_1.07.bb 2007-03-08 23:59:54 UTC (rev 1289)
@@ -2,9 +2,13 @@
HOMEPAGE = "http://www.airs.com/ian/uucp.html"
SECTION = "console/utils"
LICENSE = "GPL"
-PR = "r0"
+PR = "r1"
-SRC_URI = "ftp://ftp.gnu.org/pub/gnu/uucp/uucp-${PV}.tar.gz"
+FILESDIR = "[EMAIL PROTECTED](bb.data.getVar('FILE',d,1))}/files"
+
+SRC_URI = "ftp://ftp.gnu.org/pub/gnu/uucp/uucp-${PV}.tar.gz \
+ file://policy.patch;patch=1"
+
S = "${WORKDIR}/uucp-${PV}"
inherit autotools
--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-03-09 01:00:08 +0100 (Fri, 09 Mar 2007)
New Revision: 1290
Added:
trunk/oe/packages/upstart/
trunk/oe/packages/upstart/upstart_0.3.5.bb
Log:
initial recipe for upstart
Added: trunk/oe/packages/upstart/upstart_0.3.5.bb
===================================================================
--- trunk/oe/packages/upstart/upstart_0.3.5.bb 2007-03-08 23:59:54 UTC (rev
1289)
+++ trunk/oe/packages/upstart/upstart_0.3.5.bb 2007-03-09 00:00:08 UTC (rev
1290)
@@ -0,0 +1,19 @@
+DESCRIPTION = "Upstart: An event-based replacement for the /sbin/init daemon"
+HOMEPAGE = "http://upstart.ubuntu.com/"
+SECTION = "base"
+LICENSE = "GPL"
+PR = "r0"
+
+FILESDIR = "[EMAIL PROTECTED](bb.data.getVar('FILE',d,1))}/files"
+
+SRC_URI = "http://upstart.ubuntu.com/download/upstart-0.3.5.tar.bz2 \
+ "
+
+#S = "${WORKDIR}/uucp-${PV}"
+
+inherit autotools
+
+do_configure() {
+ gnu-configize
+ oe_runconf
+}
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2007-03-09 01:07:50 +0100 (Fri, 09 Mar 2007)
New Revision: 1291
Modified:
trunk/src/target/u-boot/patches/mmc-fixes.patch
trunk/src/target/u-boot/patches/series
Log:
include/asm-arm/arch-s3c24x0/regs-sdi.h (S3C2410_SDIDCON_BLKNUM_MASK): typo,
should be S3C2410_SDIDCNT_BLKNUM_MASK
cpu/arm920t/s3c24x0/mmc.c (mmc_block_read): use S3C2410_SDIDCON_BLKNUM instead
of bogus S3C2410_SDIDCON_BLKNUM_MASK
cpu/arm920t/s3c24x0/mmc.c (mmc_block_read): check SDIDSTA after each FIFO read
and clear any pending errors
include/configs/neo1973.h (CONFIG_SUPPORT_VFAT): just #define, to avoid
conflict with include/fat.h
cpu/arm920t/s3c24x0/mmc.c (mmc_cmd): removed unused variables "i" and "status"
cpu/arm920t/s3c24x0/mmc.c (mmc_init): removed unused variable "i"
cpu/arm920t/s3c24x0/mmc.c (rca): set this 16 bit value to 1, not 1 << 16
cpu/arm920t/s3c24x0/mmc.c (mmc_bread): changed type of "dst" from "ulong *" to
"void *" for compatibility with mmc_dev.block_read
cpu/arm920t/s3c24x0/mmc.c (mmc_bread): don't need to cast "dst" anymore when
passing to mmc_read
Modified: trunk/src/target/u-boot/patches/mmc-fixes.patch
===================================================================
--- trunk/src/target/u-boot/patches/mmc-fixes.patch 2007-03-09 00:00:08 UTC
(rev 1290)
+++ trunk/src/target/u-boot/patches/mmc-fixes.patch 2007-03-09 00:07:50 UTC
(rev 1291)
@@ -1,21 +1,3 @@
-include/asm-arm/arch-s3c24x0/regs-sdi.h (S3C2410_SDIDCON_BLKNUM_MASK): typo,
- should be S3C2410_SDIDCNT_BLKNUM_MASK
-cpu/arm920t/s3c24x0/mmc.c (mmc_block_read): use S3C2410_SDIDCON_BLKNUM instead
- of bogus S3C2410_SDIDCON_BLKNUM_MASK
-cpu/arm920t/s3c24x0/mmc.c (mmc_block_read): check SDIDSTA after each FIFO read
- and clear any pending errors
-cpu/arm920t/s3c24x0/mmc.c (mmc_block_read): commented out useless wait for
- S3C2410_SDIDSTA_XFERFINISH, added reset of S3C2410_SDIDSTA_XFERFINISH
-cpu/arm920t/s3c24x0/mmc.c (mmc_cmd): removed unused variables "i" and "status"
-cpu/arm920t/s3c24x0/mmc.c (mmc_init): removed unused variable "i"
-cpu/arm920t/s3c24x0/mmc.c (mmc_init): replaced MMC CID extraction with SD CID
- version
-cpu/arm920t/s3c24x0/mmc.c (mmc_init): added casts to suppress warnings when
- using an "unsigned char *" buffer in sprintf
-include/configs/neo1973.h (CONFIG_SUPPORT_VFAT): just #define, to avoid
- conflict with include/fat.h
-cpu/arm920t/s3c24x0/mmc.c (rca): set this 16 bit value to 1, not 1 << 16
-
Index: u-boot/cpu/arm920t/s3c24x0/mmc.c
===================================================================
--- u-boot.orig/cpu/arm920t/s3c24x0/mmc.c
@@ -38,60 +20,16 @@
dcon |= S3C2410_SDIDCON_BLOCKMODE;
dcon |= S3C2410_SDIDCON_RXAFTERCMD|S3C2410_SDIDCON_XFER_RXSTART;
if (wide)
-@@ -145,16 +143,9 @@ static int mmc_block_read(uchar *dst, ul
- resp = mmc_cmd(MMC_CMD_READ_BLOCK, src, CMD_F_RESP);
-
- while (len > 0) {
-- u_int32_t sdidsta = sdi->SDIDSTA;
-- fifo = FIFO_FILL(sdi);
-- if (sdidsta & (S3C2410_SDIDSTA_FIFOFAIL|
-- S3C2410_SDIDSTA_CRCFAIL|
-- S3C2410_SDIDSTA_RXCRCFAIL|
-- S3C2410_SDIDSTA_DATATIMEOUT)) {
-- printf("mmc_block_read: err SDIDSTA=0x%08x\n", sdidsta);
-- return -EIO;
-- }
-+ u_int32_t sdidsta, trouble;
-
-+ fifo = FIFO_FILL(sdi);
- while (fifo--) {
- //debug("dst_u32 = 0x%08x\n", dst_u32);
- *(dst_u32++) = sdi->SDIDAT;
-@@ -165,16 +156,32 @@ static int mmc_block_read(uchar *dst, ul
- break;
- }
- }
-+
-+ sdidsta = sdi->SDIDSTA;
-+ trouble = sdidsta &
-+ (S3C2410_SDIDSTA_FIFOFAIL |
-+ S3C2410_SDIDSTA_CRCFAIL |
-+ S3C2410_SDIDSTA_RXCRCFAIL |
-+ S3C2410_SDIDSTA_DATATIMEOUT);
-+ if (trouble) {
-+ printf("mmc_block_read: err SDIDSTA=0x%08x\n", sdidsta);
-+ sdi->SDIDSTA |= trouble;
-+ return -EIO;
-+ }
- }
-
-+#if 0
- debug("waiting for SDIDSTA (currently 0x%08x\n", sdi->SDIDSTA);
- while (!(sdi->SDIDSTA & (1 << 4))) {}
- debug("done waiting for SDIDSTA (currently 0x%08x\n", sdi->SDIDSTA);
-
- sdi->SDIDCON = 0;
-+#endif
-
-- if (!(sdi->SDIDSTA & S3C2410_SDIDSTA_XFERFINISH))
-+ if (!(sdi->SDIDSTA & S3C2410_SDIDSTA_XFERFINISH)) {
- debug("mmc_block_read; transfer not finished!\n");
-+ sdi->SDIDSTA |= S3C2410_SDIDSTA_XFERFINISH;
-+ }
-
+@@ -309,7 +307,7 @@ int mmc_write(uchar *src, ulong dst, int
return 0;
}
-@@ -318,7 +325,9 @@ ulong mmc_bread(int dev_num, ulong blknr
+
+-ulong mmc_bread(int dev_num, ulong blknr, ulong blkcnt, ulong *dst)
++ulong mmc_bread(int dev_num, ulong blknr, ulong blkcnt, void *dst)
+ {
+ int mmc_block_size = MMC_BLOCK_SIZE;
+ ulong src = blknr * mmc_block_size + CFG_MMC_BASE;
+@@ -318,7 +316,9 @@ ulong mmc_bread(int dev_num, ulong blknr
return blkcnt;
}
@@ -102,107 +40,14 @@
static u_int32_t mmc_size(const struct mmc_csd *csd)
{
-@@ -331,6 +340,42 @@ static u_int32_t mmc_size(const struct m
- return blocknr * block_len;
- }
+@@ -361,7 +361,6 @@ int mmc_init(int verbose)
-+struct sd_cid {
-+ char pnm_0; /* product name */
-+ char oid_1; /* OEM/application ID */
-+ char oid_0;
-+ uint8_t mid; /* manufacturer ID */
-+ char pnm_4;
-+ char pnm_3;
-+ char pnm_2;
-+ char pnm_1;
-+ uint8_t psn_2; /* product serial number */
-+ uint8_t psn_1;
-+ uint8_t psn_0; /* MSB */
-+ uint8_t prv; /* product revision */
-+ uint8_t crc; /* CRC7 checksum, b0 is unused and set to 1 */
-+ uint8_t mdt_1; /* manufacturing date, LSB, RRRRyyyy yyyymmmm */
-+ uint8_t mdt_0; /* MSB */
-+ uint8_t psn_3; /* LSB */
-+};
-+
-+static void print_cid(const struct sd_cid *cid)
-+{
-+ printf("Manufacturer: 0x%02x, OEM \"%c%c\"\n",
-+ cid->mid, cid->oid_0, cid->oid_1);
-+ printf("Product name: \"%c%c%c%c%c\", revision %d.%d\n",
-+ cid->pnm_0, cid->pnm_1, cid->pnm_2, cid->pnm_3, cid->pnm_4,
-+ cid->prv >> 4, cid->prv & 15);
-+ printf("Serial number: %u\n",
-+ cid->psn_0 << 24 | cid->psn_1 << 16 | cid->psn_2 << 8 |
-+ cid->psn_3);
-+ printf("Manufacturing date: %d/%d\n",
-+ cid->mdt_1 & 15,
-+ 2000+((cid->mdt_0 & 15) << 4)+((cid->mdt_1 & 0xf0) >> 4));
-+ printf("CRC: 0x%02x, b0 = %d\n",
-+ cid->crc >> 1, cid->crc & 1);
-+}
-+
- int mmc_init(int verbose)
- {
- int retries, rc = -ENODEV;
-@@ -361,7 +406,6 @@ int mmc_init(int verbose)
-
printf("trying to detect SD Card...\n");
while (retries--) {
- int i;
udelay(100000);
resp = mmc_cmd(55, 0x00000000, CMD_F_RESP);
resp = mmc_cmd(41, 0x00300000, CMD_F_RESP);
-@@ -386,6 +430,7 @@ int mmc_init(int verbose)
- /* try to get card id */
- resp = mmc_cmd(MMC_CMD_ALL_SEND_CID, 0, CMD_F_RESP|CMD_F_RESP_LONG);
- if (resp) {
-+#if 0
- /* TODO configure mmc driver depending on card attributes */
- mmc_cid_t *cid = (mmc_cid_t *)resp;
- if (verbose) {
-@@ -400,6 +445,29 @@ int mmc_init(int verbose)
- printf("Month = %d\n",cid->month);
- printf("Year = %d\n",1997 + cid->year);
- }
-+ sprintf(mmc_dev.vendor,"Man %02x%02x%02x Snr %02x%02x%02x",
-+ cid->id[0], cid->id[1], cid->id[2],
-+ cid->sn[0], cid->sn[1], cid->sn[2]);
-+ sprintf(mmc_dev.product,"%s",cid->name);
-+ sprintf(mmc_dev.revision,"%x %x",cid->hwrev, cid->fwrev);
-+#else
-+ struct sd_cid *cid = (struct sd_cid *) resp;
-+
-+ if (verbose)
-+ print_cid((struct sd_cid *) resp);
-+
-+ sprintf((char *) mmc_dev.vendor,
-+ "Man %02 OEM %c%c \"%c%c%c%c%c\"",
-+ cid->mid, cid->oid_0, cid->oid_1,
-+ cid->pnm_0, cid->pnm_1, cid->pnm_2, cid->pnm_3,
-+ cid->pnm_4);
-+ sprintf((char *) mmc_dev.product, "%d",
-+ cid->psn_0 << 24 | cid->psn_1 << 16 | cid->psn_2 << 8 |
-+ cid->psn_3);
-+ sprintf((char *) mmc_dev.revision, "%d.%d",
-+ cid->prv >> 4, cid->prv & 15);
-+#endif
-+
- /* fill in device description */
- mmc_dev.if_type = IF_TYPE_MMC;
- mmc_dev.part_type = PART_TYPE_DOS;
-@@ -409,11 +477,6 @@ int mmc_init(int verbose)
- /* FIXME fill in the correct size (is set to 32MByte) */
- mmc_dev.blksz = 512;
- mmc_dev.lba = 0x10000;
-- sprintf(mmc_dev.vendor,"Man %02x%02x%02x Snr %02x%02x%02x",
-- cid->id[0], cid->id[1], cid->id[2],
-- cid->sn[0], cid->sn[1], cid->sn[2]);
-- sprintf(mmc_dev.product,"%s",cid->name);
-- sprintf(mmc_dev.revision,"%x %x",cid->hwrev, cid->fwrev);
- mmc_dev.removable = 0;
- mmc_dev.block_read = mmc_bread;
-
Index: u-boot/include/asm-arm/arch-s3c24x0/regs-sdi.h
===================================================================
--- u-boot.orig/include/asm-arm/arch-s3c24x0/regs-sdi.h
@@ -220,7 +65,7 @@
===================================================================
--- u-boot.orig/include/configs/neo1973.h
+++ u-boot/include/configs/neo1973.h
-@@ -224,7 +224,7 @@
+@@ -227,7 +227,7 @@
#define CONFIG_EXT2 1
#define CONFIG_FAT 1
Modified: trunk/src/target/u-boot/patches/series
===================================================================
--- trunk/src/target/u-boot/patches/series 2007-03-09 00:00:08 UTC (rev
1290)
+++ trunk/src/target/u-boot/patches/series 2007-03-09 00:07:50 UTC (rev
1291)
@@ -64,3 +64,4 @@
uboot-dfu.patch
uboot-neo1973-defaultenv.patch
uboot-nand-markbad-reallybad.patch
+mmc-fixes.patch
--- End Message ---
_______________________________________________
commitlog mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/commitlog