Skip to contentSkip to conversation

collie: charger partially working

PATCH Pavel Machek 1 participant 1 message Jul 4, 2006

Subsystems (17)
lore
Share & tools
lore
#0 lore raw

Hi!

I got battery reading/charging code at collie to somehow working state, and to my surprise, battery voltage actually went _down_ when I enabled my charge-control code.

I was suspecting something strange before (battery was warm to touch when it should not have been charged, it was charged too fast when charger was off), and this confirms it: it looks like default collie bootstate is with charger _enabled_.

It does not actually harm, because hardware charger knows when to stop charging itself, but...

My bigdiff attached -- warning, it is ugly at places. Help determining right thresholds for...

struct battery_thresh collie_battery_levels_acin[] = { struct battery_thresh collie_battery_levels[] = {

...would be nice. I guess that just takes little patience: discharge collie, and notice how voltage changes with time. (I believe some oz had quite accurate gauges?)

Warning #2: this plays with lithium. But I guess older versions abused lithium in much worse ways, so...

(I'd not leave collie unattended with both battery and charger plugged in, though.)

Question: sharpsl_pm only checks if temperature > limit, AFAICS. Should not it check if temperature is between two limits? IIRC li-ions should not be charged when room temperature is <5 Celsius or

Quoted 1 line

40 Celsius or so...

Pavel

Makefile +2 -5
index 11a850c..ab4eba2 100644
@@ -149,10 +149,7 @@ export srctree objtree VPATH TOPDIR
 # then ARCH is assigned, getting whatever value it gets normally, and 
 # SUBARCH is subsequently ignored.
 
-SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
-				  -e s/arm.*/arm/ -e s/sa110/arm/ \
-				  -e s/s390x/s390/ -e s/parisc64/parisc/ \
-				  -e s/ppc.*/powerpc/ -e s/mips.*/mips/ )
+SUBARCH := arm
 
 # Cross compiling and selecting different set of gcc/bin-utils
 # ---------------------------------------------------------------------------
@@ -174,7 +171,7 @@ SUBARCH := $(shell uname -m | sed -e s/i
 # Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
 
 ARCH		?= $(SUBARCH)
-CROSS_COMPILE	?=
+CROSS_COMPILE	?= /scratchbox/compilers/arm-gcc-3.3.4-glibc-2.3.2/bin/arm-linux-
 
 # Architecture as present in compile.h
 UTS_MACHINE := $(ARCH)
arch/arm/Kconfig +13 -1
index f81a623..766a737 100644
@@ -690,7 +690,7 @@ config XIP_PHYS_ADDR
 
 endmenu
 
-if (ARCH_SA1100 || ARCH_INTEGRATOR || ARCH_OMAP)
+if (ARCH_SA1100 || ARCH_INTEGRATOR || ARCH_OMAP || ARCH_PXA)
 
 menu "CPU Frequency scaling"
 
@@ -717,6 +717,18 @@ config CPU_FREQ_INTEGRATOR
 
 	  If in doubt, say Y.
 
+config CPU_FREQ_PXA25x
+	bool
+	select CPU_FREQ_TABLE
+	depends on CPU_FREQ && PXA25x
+	default y
+
+config CPU_FREQ_PXA27x
+	bool
+	select CPU_FREQ_TABLE
+	depends on CPU_FREQ && PXA27x
+	default y
+
 endmenu
 
 endif
arch/arm/boot/Makefile +6 -0
index ec9c400..73ead54 100644
@@ -56,6 +56,12 @@ $(obj)/compressed/vmlinux: $(obj)/Image 
 $(obj)/zImage:	$(obj)/compressed/vmlinux FORCE
 	$(call if_changed,objcopy)
 	@echo '  Kernel: $@ is ready'
+	@ls -al $@
+	@wc -c $@ | ( read SIZE Y; \
+		if [ $$SIZE -gt 1294336 ]; then \
+			echo '  Kernel is too big, would kill spitz'; \
+			rm $@; \
+		fi )
 
 endif
 
arch/arm/common/locomo.c +3 -2
index fbc3ab0..fdafed7 100644
@@ -506,7 +506,7 @@ locomo_init_one_child(struct locomo *lch
 		goto out;
 	}
 
-	strncpy(dev->dev.bus_id,info->name,sizeof(dev->dev.bus_id));
+	strncpy(dev->dev.bus_id, info->name, sizeof(dev->dev.bus_id));
 	/*
 	 * If the parent device has a DMA mask associated with it,
 	 * propagate it down to the children.
@@ -729,7 +729,6 @@ __locomo_probe(struct device *me, struct
 
 	for (i = 0; i < ARRAY_SIZE(locomo_devices); i++)
 		locomo_init_one_child(lchip, &locomo_devices[i]);
-
 	return 0;
 
  out:
@@ -1046,6 +1045,8 @@ void locomo_m62332_senddata(struct locom
  *	Frontlight control
  */
 
+#define LOCOMO_GPIO9        (1<<9)
+
 static struct locomo *locomo_chip_driver(struct locomo_dev *ldev);
 
 void locomo_frontlight_set(struct locomo_dev *dev, int duty, int vr, int bpwf)
arch/arm/common/sharpsl_pm.c +31 -5
index 045e37e..12beac3 100644
@@ -12,7 +12,7 @@
  *
  */
 
-#undef DEBUG
+#define DEBUG
 
 #include <linux/module.h>
 #include <linux/timer.h>
@@ -28,11 +28,17 @@
 #include <asm/mach-types.h>
 #include <asm/irq.h>
 #include <asm/apm.h>
+
+#ifndef CONFIG_SA1100_COLLIE
 #include <asm/arch/pm.h>
 #include <asm/arch/pxa-regs.h>
 #include <asm/arch/sharpsl.h>
+#endif
 #include <asm/hardware/sharpsl_pm.h>
 
+#define dev_dbg(a, b...) printk(b)
+
+
 /*
  * Constants
  */
@@ -155,6 +161,7 @@ static void sharpsl_battery_thread(void 
 	dev_dbg(sharpsl_pm.dev, "Battery: voltage: %d, status: %d, percentage: %d, time: %d\n", voltage,
 			sharpsl_pm.battstat.mainbat_status, sharpsl_pm.battstat.mainbat_percent, jiffies);
 
+#ifndef CONFIG_SA1100_COLLIE
 	/* If battery is low. limit backlight intensity to save power. */
 	if ((sharpsl_pm.battstat.ac_status != APM_AC_ONLINE)
 			&& ((sharpsl_pm.battstat.mainbat_status == APM_BATTERY_STATUS_LOW) ||
@@ -167,6 +174,7 @@ static void sharpsl_battery_thread(void 
 		sharpsl_pm.machinfo->backlight_limit(0);
 		sharpsl_pm.flags &= ~SHARPSL_BL_LIMIT;
 	}
+#endif
 
 	/* Suspend if critical battery level */
 	if ((sharpsl_pm.battstat.ac_status != APM_AC_ONLINE)
@@ -276,13 +284,21 @@ static void sharpsl_chrg_full_timer(unsi
 		dev_dbg(sharpsl_pm.dev, "Charge Full: AC removed - stop charging!\n");
 		if (sharpsl_pm.charge_mode == CHRG_ON)
 			sharpsl_charge_off();
-	} else if (sharpsl_pm.full_count < 2) {
+		return;
+	} 
+#ifndef CONFIG_SA1100_COLLIE
+	if (sharpsl_pm.full_count < 2) {
 		dev_dbg(sharpsl_pm.dev, "Charge Full: Count too low\n");
 		schedule_work(&toggle_charger);
-	} else if (time_after(jiffies, sharpsl_pm.charge_start_time + SHARPSL_CHARGE_FINISH_TIME)) {
+		return;
+	} 
+	if (time_after(jiffies, sharpsl_pm.charge_start_time + SHARPSL_CHARGE_FINISH_TIME)) {
 		dev_dbg(sharpsl_pm.dev, "Charge Full: Interrupt generated too slowly - retry.\n");
 		schedule_work(&toggle_charger);
-	} else {
+		return;
+	}
+#endif
+	{
 		sharpsl_charge_off();
 		sharpsl_pm.charge_mode = CHRG_DONE;
 		dev_dbg(sharpsl_pm.dev, "Charge Full: Charging Finished\n");
@@ -294,6 +310,7 @@ static void sharpsl_chrg_full_timer(unsi
    delay until after that has been processed */
 irqreturn_t sharpsl_chrg_full_isr(int irq, void *dev_id, struct pt_regs *fp)
 {
+	printk("charge full interrupt came\n");
 	if (sharpsl_pm.flags & SHARPSL_SUSPENDED)
 		return IRQ_HANDLED;
 
@@ -412,8 +429,10 @@ static int sharpsl_check_battery_temp(vo
 	val = get_select_val(buff);
 
 	dev_dbg(sharpsl_pm.dev, "Temperature: %d\n", val);
-	if (val > sharpsl_pm.machinfo->charge_on_temp)
+	if (val > sharpsl_pm.machinfo->charge_on_temp) {
+		printk(KERN_WARNING "Not charging: temperature out of limits.\n"); 
 		return -1;
+	}
 
 	return 0;
 }
@@ -502,6 +521,7 @@ static void corgi_goto_sleep(unsigned lo
 	dev_dbg(sharpsl_pm.dev, "Offline Charge Activate = %d\n",sharpsl_pm.flags & SHARPSL_DO_OFFLINE_CHRG);
 	/* not charging and AC-IN! */
 
+#ifndef CONFIG_SA1100_COLLIE
 	if ((sharpsl_pm.flags & SHARPSL_DO_OFFLINE_CHRG) && (sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_ACIN))) {
 		dev_dbg(sharpsl_pm.dev, "Activating Offline Charger...\n");
 		sharpsl_pm.charge_mode = CHRG_OFF;
@@ -532,6 +552,7 @@ static void corgi_goto_sleep(unsigned lo
 	sharpsl_pm.machinfo->postsuspend();
 
 	dev_dbg(sharpsl_pm.dev, "Corgi woken up from suspend: %08x\n",PEDR);
+#endif
 }
 
 static int corgi_enter_suspend(unsigned long alarm_time, unsigned int alarm_enable, suspend_state_t state)
@@ -629,6 +650,7 @@ static int sharpsl_fatal_check(void)
 
 static int sharpsl_off_charge_error(void)
 {
+	panic("collie: not off charging\n");
 	dev_err(sharpsl_pm.dev, "Offline Charger: Error occured.\n");
 	sharpsl_pm.machinfo->charge(0);
 	sharpsl_pm_led(SHARPSL_LED_ERROR);
@@ -645,6 +667,7 @@ static int sharpsl_off_charge_battery(vo
 {
 	int time;
 
+	panic("off_charging -- not on collie\n");
 	dev_dbg(sharpsl_pm.dev, "Charge Mode: %d\n", sharpsl_pm.charge_mode);
 
 	if (sharpsl_pm.charge_mode == CHRG_OFF) {
@@ -761,9 +784,11 @@ static void sharpsl_apm_get_power_status
 
 static struct pm_ops sharpsl_pm_ops = {
 	.pm_disk_mode	= PM_DISK_FIRMWARE,
+#ifndef CONFIG_SA1100_COLLIE
 	.prepare	= pxa_pm_prepare,
 	.enter		= corgi_pxa_pm_enter,
 	.finish		= pxa_pm_finish,
+#endif
 };
 
 static int __init sharpsl_pm_probe(struct platform_device *pdev)
@@ -773,6 +798,7 @@ static int __init sharpsl_pm_probe(struc
 
 	sharpsl_pm.dev = &pdev->dev;
 	sharpsl_pm.machinfo = pdev->dev.platform_data;
+
 	sharpsl_pm.charge_mode = CHRG_OFF;
 	sharpsl_pm.flags = 0;
 
arch/arm/kernel/traps.c +6 -3
index 35a052f..b7607df 100644
@@ -56,8 +56,6 @@ void dump_backtrace_entry(unsigned long 
 #ifdef CONFIG_KALLSYMS
 	printk("[<%08lx>] ", where);
 	print_symbol("(%s) ", where);
-	printk("from [<%08lx>] ", from);
-	print_symbol("(%s)\n", from);
 #else
 	printk("Function entered at [<%08lx>] from [<%08lx>]\n", where, from);
 #endif
@@ -156,6 +154,7 @@ static void dump_backtrace(struct pt_reg
 	unsigned int fp;
 	int ok = 1;
 
+#if 0
 	printk("Backtrace: ");
 	fp = regs->ARM_fp;
 	if (!fp) {
@@ -170,6 +169,7 @@ static void dump_backtrace(struct pt_reg
 
 	if (ok)
 		c_backtrace(fp, processor_mode(regs));
+#endif
 }
 
 void dump_stack(void)
@@ -209,10 +209,13 @@ static void __die(const char *str, int e
 		tsk->comm, tsk->pid, thread + 1);
 
 	if (!user_mode(regs) || in_interrupt()) {
+#if 0
 		dump_mem("Stack: ", regs->ARM_sp,
 			 THREAD_SIZE + (unsigned long)task_stack_page(tsk));
+#endif
+
 		dump_backtrace(regs, tsk);
-		dump_instr(regs);
+//		dump_instr(regs);
 	}
 }
 
arch/arm/kernel/vmlinux.lds.S +1 -1
index 3ca574e..e3ac6ab 100644
@@ -181,6 +181,6 @@ SECTIONS
  * These must never be empty
  * If you have to comment these two assert statements out, your
  * binutils is too old (for other reasons as well)
- */
 ASSERT((__proc_info_end - __proc_info_begin), "missing CPU support")
 ASSERT((__arch_info_end - __arch_info_begin), "no machine record defined")
+*/
arch/arm/mach-pxa/sharpsl.h +3 -0
index da4769c..c92544d 100644
@@ -12,6 +12,9 @@
 /*
  * SharpSL SSP Driver
  */
+
+#include <linux/interrupt.h>
+
 struct corgissp_machinfo {
 	int port;
 	int cs_lcdcon;
arch/arm/mach-sa1100/Makefile +3 -0
index e27f150..b90534b 100644
@@ -24,6 +24,9 @@ obj-$(CONFIG_SA1100_CERF)		+= cerf.o
 led-$(CONFIG_SA1100_CERF)		+= leds-cerf.o
 
 obj-$(CONFIG_SA1100_COLLIE)		+= collie.o
+obj-$(CONFIG_SA1100_COLLIE)		+= collie_pm.o
+obj-$(CONFIG_SA1100_COLLIE)		+= sharpsl_pm.o
+obj-$(CONFIG_SA1100_COLLIE)		+= collie_batswitch.o
 
 obj-$(CONFIG_SA1100_H3600)		+= h3600.o
 
arch/arm/mach-sa1100/collie.c +56 -4

98 lines not on this page · raw message

arch/arm/mach-sa1100/collie_batswitch.c new file +151 -0

151 lines not on this page · raw message

arch/arm/mach-sa1100/collie_pm.c +43 -9

95 lines not on this page · raw message

arch/arm/mach-sa1100/pm.c +1 -1
index 786c853..f363074 100644
@@ -54,7 +54,7 @@ enum {	SLEEP_SAVE_SP = 0,
 };
 
 
-static int sa11x0_pm_enter(suspend_state_t state)
+int sa11x0_pm_enter(suspend_state_t state)
 {
 	unsigned long gpio, sleep_save[SLEEP_SAVE_SIZE];
 	struct timespec delta, rtc;
drivers/char/Makefile +1 -1
index 6e0f446..794a581 100644
@@ -115,7 +115,7 @@ $(obj)/qtronixmap.o: $(obj)/qtronixmap.c
 # Uncomment if you're changing the keymap and have an appropriate
 # loadkeys version for the map. By default, we'll use the shipped
 # versions.
-# GENERATE_KEYMAP := 1
+ GENERATE_KEYMAP := 1
 
 ifdef GENERATE_KEYMAP
 
drivers/char/defkeymap.map +129 -224

393 lines not on this page · raw message

drivers/leds/leds-locomo.c +1 -1
index 3b87951..e832d9f 100644
@@ -50,7 +50,7 @@ static struct led_classdev locomo_led0 =
 
 static struct led_classdev locomo_led1 = {
 	.name			= "locomo:green",
-	.default_trigger	= "nand-disk",
+	.default_trigger	= "heartbeat",
 	.brightness_set		= locomoled_brightness_set1,
 };
 
drivers/leds/ledscore.c new file +0 -0
new file mode 100644
index 0000000..e69de29
drivers/mfd/Kconfig +4 -0
index fc3c885..3fa0aca 100644
@@ -19,6 +19,10 @@ config MCP_UCB1200
 	tristate "Support for UCB1200 / UCB1300"
 	depends on MCP
 
+config MCP_UCB1200_AUDIO
+	tristate "Audio / Telephony interface support"
+	depends on MCP_UCB1200 && SOUND
+
 config MCP_UCB1200_TS
 	tristate "Touchscreen interface support"
 	depends on MCP_UCB1200 && INPUT
drivers/mfd/Makefile +2 -1
index adb29b5..9563c66 100644
@@ -6,7 +6,8 @@ obj-$(CONFIG_MCP)		+= mcp-core.o
 obj-$(CONFIG_MCP_SA11X0)	+= mcp-sa11x0.o
 obj-$(CONFIG_MCP_UCB1200)	+= ucb1x00-core.o
 obj-$(CONFIG_MCP_UCB1200_TS)	+= ucb1x00-ts.o
-
+obj-$(CONFIG_MCP_UCB1200_AUDIO)	+= ucb1x00-audio.o
+ 
 ifeq ($(CONFIG_SA1100_ASSABET),y)
 obj-$(CONFIG_MCP_UCB1200)	+= ucb1x00-assabet.o
 endif
drivers/mfd/mcp-sa11x0.c +36 -1
index 1eab7cf..f13f820 100644
@@ -170,6 +170,16 @@ static int mcp_sa11x0_probe(struct platf
 		ASSABET_BCR_set(ASSABET_BCR_CODEC_RST);
 	}
 
+	if (machine_is_collie()) {
+		GAFR &= ~(GPIO_GPIO(16));
+		GPDR |= GPIO_GPIO(16);
+		GPSR |= GPIO_GPIO(16);
+
+		/* MCP ExtClk */
+		GAFR |= GPIO_MCP_CLK;
+		GPDR &= ~GPIO_MCP_CLK;
+	}
+
 	/*
 	 * Setup the PPC unit correctly.
 	 */
@@ -185,7 +195,32 @@ static int mcp_sa11x0_probe(struct platf
 	 */
 	Ser4MCSR = -1;
 	Ser4MCCR1 = data->mccr1;
-	Ser4MCCR0 = data->mccr0 | 0x7f7f;
+#if 1
+	if (machine_is_collie()) {
+/* Gives 0/1023 for battery reading. Actually works.. but gives same range as below */
+		Ser4MCCR0 = MCCR0_ADM | MCCR0_ExtClk;
+/* From sharp's colliebuzzer. Gives 896 for battery & temp 
+		int asd = (9216000 / ( 32 * 11025 ));
+		Ser4MCCR0 &= ~MCCR0_MCE;
+		Ser4MCCR0 &= ~0xff;
+		Ser4MCCR0 |= ( MCCR0_ATE |MCCR0_ADM | MCCR0_ECS | asd);
+		Ser4MCCR0 |= MCCR0_MCE;
+		Ser4MCSR   = 0xffffffff;
+ */
+/* Sharp seems to initialize it like this: only gives timeouts :-(
+		Ser4MCCR0 = 0;
+ */
+/* Heh, this seems to give 1010 for battery & temp
+		Ser4MCCR0 = MCCR0_ATE | MCCR0_ECS;
+ */
+/*
+  Can't detect interrupt with this :-(.
+		Ser4MCCR0 = MCCR0_ATE;
+*/
+	} else
+#endif
+		Ser4MCCR0 = data->mccr0 | 0x7f7f;
+
 
 	/*
 	 * Calculate the read/write timeout (us) from the bit clock
drivers/mfd/ucb1x00-audio.c new file +434 -0

434 lines not on this page · raw message

drivers/mfd/ucb1x00-core.c +11 -6
index 632bc21..dd973b0 100644
@@ -28,7 +28,9 @@
 #include <asm/dma.h>
 #include <asm/hardware.h>
 
+#include "mcp.h"
 #include "ucb1x00.h"
+#include <asm/mach-types.h>
 
 static DEFINE_MUTEX(ucb1x00_mutex);
 static LIST_HEAD(ucb1x00_drivers);
@@ -473,15 +475,17 @@ static int ucb1x00_probe(struct mcp *mcp
 {
 	struct ucb1x00 *ucb;
 	struct ucb1x00_driver *drv;
-	unsigned int id;
+	unsigned int id = UCB_ID_1200;
 	int ret = -ENODEV;
 
 	mcp_enable(mcp);
-	id = mcp_reg_read(mcp, UCB_ID);
+	if (!machine_is_collie()) {
+		id = mcp_reg_read(mcp, UCB_ID);
 
-	if (id != UCB_ID_1200 && id != UCB_ID_1300) {
-		printk(KERN_WARNING "UCB1x00 ID not found: %04x\n", id);
-		goto err_disable;
+		if (id != UCB_ID_1200 && id != UCB_ID_1300 && id != UCB_ID_TC35143) {
+			printk(KERN_WARNING "UCB1x00 ID not found: %04x\n", id);
+			goto err_disable;
+		}
 	}
 
 	ucb = kmalloc(sizeof(struct ucb1x00), GFP_KERNEL);
@@ -501,10 +505,11 @@ static int ucb1x00_probe(struct mcp *mcp
 
 	ucb->id  = id;
 	ucb->mcp = mcp;
-	ucb->irq = ucb1x00_detect_irq(ucb);
+	ucb->irq = ucb1x00_detect_irq(ucb); /* 44 */
 	if (ucb->irq == NO_IRQ) {
 		printk(KERN_ERR "UCB1x00: IRQ probe failed\n");
 		ret = -ENODEV;
+		panic("UCB1x00: We really want our interrupt\n");
 		goto err_free;
 	}
 
drivers/mfd/ucb1x00-ts.c +113 -7

190 lines not on this page · raw message

drivers/mfd/ucb1x00.h +1 -0
index 9c9a647..ca8df80 100644
@@ -94,6 +94,7 @@
 #define UCB_ID		0x0c
 #define UCB_ID_1200		0x1004
 #define UCB_ID_1300		0x1005
+#define UCB_ID_TC35143          0x9712
 
 #define UCB_MODE	0x0d
 #define UCB_MODE_DYN_VFLAG_ENA	(1 << 12)
drivers/misc/mcp-ac97.c new file +0 -0
new file mode 100644
index 0000000..e69de29
drivers/misc/mcp-core.c new file +0 -0
new file mode 100644
index 0000000..e69de29
drivers/misc/mcp-sa1100.c new file +0 -0
new file mode 100644
index 0000000..e69de29
drivers/misc/ucb1x00-assabet.c new file +0 -0
new file mode 100644
index 0000000..e69de29
drivers/misc/ucb1x00-audio.c new file +0 -0
new file mode 100644
index 0000000..e69de29
drivers/misc/ucb1x00-core.c new file +0 -0
new file mode 100644
index 0000000..e69de29
drivers/mtd/chips/sharp.c +120 -76

409 lines not on this page · raw message

drivers/mtd/maps/Kconfig +1 -1
index 83d0b2a..449431d 100644
@@ -427,7 +427,7 @@ config MTD_CDB89712
 
 config MTD_SA1100
 	tristate "CFI Flash device mapped on StrongARM SA11x0"
-	depends on MTD_CFI && ARCH_SA1100 && MTD_PARTITIONS
+	depends on ARM && (MTD_CFI || MTD_SHARP) && ARCH_SA1100 && MTD_PARTITIONS
 	help
 	  This enables access to the flash chips on most platforms based on
 	  the SA1100 and SA1110, including the Assabet and the Compaq iPAQ.
drivers/mtd/maps/sa1100-flash.c +4 -0
index 950bf1c..90c1230 100644
@@ -210,6 +210,10 @@ static int sa1100_probe_subdev(struct sa
 		goto err;
 	}
 	subdev->mtd->owner = THIS_MODULE;
+#ifdef CONFIG_SA1100_COLLIE
+	if (subdev->mtd->unlock)	/* Should be only done when we are not using sharp map.. */
+		subdev->mtd->unlock(subdev->mtd, 0xc0000, subdev->mtd->size - 0xc0000);
+#endif
 
 	printk(KERN_INFO "SA1100 flash: CFI device at 0x%08lx, %dMiB, "
 		"%d-bit\n", phys, subdev->mtd->size >> 20,
drivers/pcmcia/sa1100_generic.c +1 -1
index c5b2a44..2a960a3 100644
@@ -117,5 +117,5 @@ MODULE_AUTHOR("John Dorsey <[email protected]
 MODULE_DESCRIPTION("Linux PCMCIA Card Services: SA-11x0 Socket Controller");
 MODULE_LICENSE("Dual MPL/GPL");
 
-fs_initcall(sa11x0_pcmcia_init);
+late_initcall(sa11x0_pcmcia_init);
 module_exit(sa11x0_pcmcia_exit);
drivers/pcmcia/soc_common.c +2 -1
index ecaa132..7b4bcf5 100644
@@ -46,6 +46,7 @@
 #include <asm/io.h>
 #include <asm/system.h>
 
+#define DEBUG
 #include "soc_common.h"
 
 /* FIXME: platform dependent resource declaration has to move out of this file */
@@ -55,7 +56,7 @@
 
 #ifdef DEBUG
 
-static int pc_debug;
+static int pc_debug = 15;
 module_param(pc_debug, int, 0644);
 
 void soc_pcmcia_debug(struct soc_pcmcia_socket *skt, const char *func,
drivers/serial/serial_cs.c +1 -1
index cbf260b..78a1eb6 100644
@@ -274,7 +274,7 @@ static int setup_serial(struct pcmcia_de
 	port.iobase = iobase;
 	port.irq = irq;
 	port.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_SHARE_IRQ;
-	port.uartclk = 1843200;
+	port.uartclk = 921600 * 16;
 	port.dev = &handle_to_dev(handle);
 	if (buggy_uart)
 		port.flags |= UPF_BUGGY_UART;
drivers/soc/.built-in.o.cmd new file +1 -0
new file mode 100644
index 0000000..23e5d99
@@ -0,0 +1 @@
+cmd_drivers/soc/built-in.o :=  rm -f drivers/soc/built-in.o; /scratchbox/compilers/arm-gcc-3.3.4-glibc-2.3.2/bin/arm-linux-ar rcs drivers/soc/built-in.o
drivers/soc/Kconfig new file +0 -0
new file mode 100644
index 0000000..e69de29
drivers/soc/Makefile new file +0 -0
new file mode 100644
index 0000000..e69de29
drivers/soc/built-in.o new file +1 -0
new file mode 100644
index 0000000..8b277f0
@@ -0,0 +1 @@
+!<arch>
drivers/soc/tsc2101.c new file +0 -0
new file mode 100644
index 0000000..e69de29
drivers/soc/tsc2101.h new file +0 -0
new file mode 100644
index 0000000..e69de29
drivers/usb/net/zd1201.c +0 -0
include/asm-arm/arch-pxa/pxa_keys.h new file +0 -0
new file mode 100644
index 0000000..e69de29
include/asm-arm/arch-sa1100/collie.h +239 -0

249 lines not on this page · raw message

include/linux/device.h +1 -1
index 1e5f30d..ef34988 100644
@@ -418,7 +418,7 @@ extern void firmware_unregister(struct s
 /* debugging and troubleshooting/diagnostic helpers. */
 extern const char *dev_driver_string(struct device *dev);
 #define dev_printk(level, dev, format, arg...)	\
-	printk(level "%s %s: " format , dev_driver_string(dev) , (dev)->bus_id , ## arg)
+	printk(level "%s %s: " format , (!dev) ? "" : (dev)->driver ? (dev)->driver->name : "" , (dev)->bus_id , ## arg)
 
 #ifdef DEBUG
 #define dev_dbg(dev, format, arg...)		\
include/linux/plist.h +1 -0
index b95818a..bdd64bb 100644
@@ -76,6 +76,7 @@
 #include <linux/kernel.h>
 #include <linux/list.h>
 #include <linux/spinlock_types.h>
+#include <linux/kernel.h>
 
 struct plist_head {
 	struct list_head prio_list;
mm/page_alloc.c +5 -3
index 54a4f53..efee0fb 100644
@@ -2208,11 +2208,13 @@ void setup_per_zone_pages_min(void)
 	}
 
 	for_each_zone(zone) {
-		u64 tmp;
+		volatile u32 tmp;
 
+		barrier();
 		spin_lock_irqsave(&zone->lru_lock, flags);
-		tmp = (u64)pages_min * zone->present_pages;
-		do_div(tmp, lowmem_pages);
+		barrier();
+		tmp = (u32)pages_min * zone->present_pages;
+		tmp = tmp / lowmem_pages;
 		if (is_highmem(zone)) {
 			/*
 			 * __GFP_HIGH and PF_MEMALLOC allocations usually don't
mm/vmscan.c +3 -3
index 5d4c4d0..efdb26a 100644
@@ -179,13 +179,13 @@ unsigned long shrink_slab(unsigned long 
 		return 1;	/* Assume we'll be able to shrink next time */
 
 	list_for_each_entry(shrinker, &shrinker_list, list) {
-		unsigned long long delta;
+		unsigned long delta;
 		unsigned long total_scan;
 		unsigned long max_pass = (*shrinker->shrinker)(0, gfp_mask);
 
 		delta = (4 * scanned) / shrinker->seeks;
-		delta *= max_pass;
-		do_div(delta, lru_pages + 1);
+		delta *= (*shrinker->shrinker)(0, gfp_mask);
+		delta = delta / (lru_pages + 1);
 		shrinker->nr += delta;
 		if (shrinker->nr < 0) {
 			printk(KERN_ERR "%s: nr=%ld\n",
sound/soc/.built-in.o.cmd new file +1 -0
new file mode 100644
index 0000000..3d8f3fc
@@ -0,0 +1 @@
+cmd_sound/soc/built-in.o :=  rm -f sound/soc/built-in.o; /scratchbox/compilers/arm-gcc-3.3.4-glibc-2.3.2/bin/arm-linux-ar rcs sound/soc/built-in.o
sound/soc/Kconfig new file +0 -0
new file mode 100644
index 0000000..e69de29
sound/soc/Makefile new file +0 -0
new file mode 100644
index 0000000..e69de29
sound/soc/built-in.o new file +1 -0
new file mode 100644
index 0000000..8b277f0
@@ -0,0 +1 @@
+!<arch>
sound/soc/codecs/Kconfig new file +0 -0
new file mode 100644
index 0000000..e69de29
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html