Re: [PATCH] [RFC v3] OF: OpenFirmware bindings for the mmc_spi driver

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jon Smirl
Date: Wednesday, July 2, 2008 - 8:26 pm

On 6/5/08, Anton Vorontsov <avorontsov@ru.mvista.com> wrote:

Why does this need to be loaded at subsys_initcall time? We have the
equivalent code on i2c loading as a normal module.

When the spi bus driver code is processing the child SPI device nodes,
it should request_module() this driver as a module. I made a note to
fix that on Grant's SPI bus driver.

		spi@f00 {
			#address-cells = <1>;
			#size-cells = <0>;
			compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi";
Triggers loading of Grant's SPI module via normal OF module mechanism
			reg = <0xf00 0x20>;
			interrupts = <0x2 0xd 0x0 0x2 0xe 0x0>;
			interrupt-parent = <&mpc5200_pic>;
			
Grant's code loops through the child nodes
			mmc-slot@0 {
				compatible = "mmc-spi";
Finds this and does request_module("mmc-spi");
Then it registers the device
				reg = <0>;
				max-speed = <50000000>;
				/* Unregulated slot. */
				voltage-range = <3300 3300>;
				/*gpios = <&sdcsr_pio 1 0   /*  WP */
				/*		 &sdcsr_pio 0 1>; /* nCD */
			};			
		};

As part of this module's initialization it may need to request_module
generic mmc core module, but I haven't traced things out that far yet.
None of these parts should need to be compiled in, they should all be
capable of being loaded as a modules.



-- 
Jon Smirl
jonsmirl@gmail.com
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] [RFC v3] OF: OpenFirmware bindings for the mmc ..., Jon Smirl, (Wed Jul 2, 8:26 pm)