diff mbox

Nokia N900: omap aes is broken

Message ID 201502182202.30272@pali (mailing list archive)
State New, archived
Headers show

Commit Message

Pali Rohár Feb. 18, 2015, 9:02 p.m. UTC
On Wednesday 18 February 2015 13:21:03 Pali Rohár wrote:
> Hello,
> 
> I tried to test OMAP AES driver on Nokia N900 with special
> Nokia bootloader which enable L3 firewall for OMAP AES HW
> support.
> 
> I modified arch/arm/boot/dts/omap34xx-hs.dtsi file and
> commented aes line which disable aes support in DT.
> 
> Then I booted kernel and loaded omap-aes.ko module. And I got
> this output in dmesg:
> 
> [    0.222930] platform 480c5000.aes: Cannot lookup hwmod
> 'aes' [   27.758148] omap-aes 480c5000.aes:
> _od_fail_runtime_resume: FIXME: missing hwmod/omap_dev info
> [   27.765960] omap-aes 480c5000.aes: omap_aes_probe: failed
> to get_sync(-19)
> [   29.257690] omap-aes 480c5000.aes: initialization failed.
> 
> So it looks like some initialization data are missing for
> Nokia N900 (omap3430 device).
> 
> Can somebody look at it? I have patched 2.6.28 kernel were
> omap aes support on this N900 device (with special
> bootloader) is working.
> 
> Maybe some other data are missing in DT or in hwmod?

dma channels are missing in DT. I applied this patch:



and omap-aes driver was successfully loaded. now it is in /proc/crypto

I copied dma names and numbers from file arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
diff mbox

Patch

diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
index 01b7111..473d460 100644
--- a/arch/arm/boot/dts/omap3.dtsi
+++ b/arch/arm/boot/dts/omap3.dtsi
@@ -92,6 +92,8 @@ 
 			ti,hwmods = "aes";
 			reg = <0x480c5000 0x50>;
 			interrupts = <0>;
+			dmas = <&sdma 65 &sdma 66>;
+			dma-names = "tx", "rx";
 		};
 
 		prm: prm@48306000 {
@@ -550,6 +552,8 @@ 
 			ti,hwmods = "sham";
 			reg = <0x480c3000 0x64>;
 			interrupts = <49>;
+			dmas = <&sdma 96>;
+			dma-names = "rx";
 		};
 
 		smartreflex_core: smartreflex@480cb000 {