TQM5200 2.6-denx SM501 voyager enabling problem.

Pedro Luis D. L. carcadiz at hotmail.com
Fri Mar 7 01:09:28 EST 2008



I wrote: (:-p)
> 
> 
> Martin Krause  wrote:
> 
> 
>> Hi Pedro,
>> 
>> Pedro Luis D. L.  hotmail.com> writes:
>>> Hello,
>>> I'm working right now with a TQM5200 microcontroller on a STX5200 board.
>>> I'm having problems to enable SM501 video output using 2.6-denx kernel. The 
>> 
>> Have you tried to contact TQ-Components (the manufacturer of the TQM5200 
>> board)? Under the email address support at tqc.de you should get help for
>> hardware and software questions to all of their products.
>> 
>> Regards,
>> Martin
> 
> Hi Martin,
> 
> Well, that sounds like a very reasonable suggestion. I think I should give it a try. Maybe my bad experience with other providers pushed me to ask in this list before. But you're right!
> 
> Regards,
> Pedro.
>  
> 

I tried to contact TQ but they seem not to be able to solve my problem. They suggested that the problem could be in the different endianness used by MPC5200 and SMI501. That problem seems to be corrected in the driver. Anyway, this endianness problem may come to light if I had any video output. It is possible to change the endianness of SM501 chip from the u-boot writing a register. I did it and it made no difference at all. The real problem is still that none device is initialized or detected even when the Framebuffer driver for SM501 and MFD Driver for SM501 are compiled with the kernel. I checked that platform driver for both are registered (using some printk output) but their probe functions are never invoked.

I thought that my problem could be that I don't have initialized the device within the platform file tqm5200.c. I added the following code (marked with +) to this file under arch/powerpc/platforms/52xx/tqm5200.c

+static struct resource sm501_resources[] = {
+	[0]	= {
+		.start	= 0xE3E00000,
+		.end	= 0xE3DFFFFF,
+		.flags	= IORESOURCE_MEM,
+	},
+};
+
+static struct platform_device sm501_device = {
+	.name		= "sm501",
+	.id		= 0,
+	.num_resources	= ARRAY_SIZE(sm501_resources),
+	.resource	= sm501_resources,
+};

static void __init tqm5200_setup_arch(void)
{
	if (ppc_md.progress)
		ppc_md.progress("tqm5200_setup_arch()", 0);

	/* Some mpc5200 & mpc5200b related configuration */
	mpc5200_setup_xlb_arbiter();

	/* Map wdt for mpc52xx_restart() */
	mpc52xx_map_wdt();

#ifdef CONFIG_PCI
	np = of_find_node_by_type(NULL, "pci");
	if (np) {
		mpc52xx_add_bridge(np);
		of_node_put(np);
	}
#endif
+
+	platform_device_register(&sm501_device);
+
}

I got this idea from the configuration files from other platforms, but I still need to find out how exactly "resources" must be defined. Anybody knows wheather am I pointing in the right direction and this makes any sense?

As far as I understand now (and I may be terribly wrong), once that SM501 MFD and Framebuffer drivers are registered,  I need to tell the kernel where to find the device in the local bus. Is it right?

Thanks in advance,

Pedro.

_________________________________________________________________
Tecnología, moda, motor, viajes,…suscríbete a nuestros boletines para estar siempre a la última
Guapos y guapas, clips musicales y estrenos de cine. 


More information about the Linuxppc-embedded mailing list