Add support for the BootMii 'mini' firmware replacement for the
Starlet processor.

'mini' is an open source IOS replacement written from scratch by
Team Twiizers.

It's not a replacement, it doesn't have any of the same functionality.

It grants full access to the hardware found on the
Nintendo Wii video game console via a custom IPC mechanism.

This is out of date, you get full register-level hardware access now.

Do you want to mainline any of the drivers that work via mini proxy?
If not, you can remove quite some bit of code here I think.

+enum starlet_ipc_flavour {
+       STARLET_IPC_IOS,
+       STARLET_IPC_MINI,
+};

I thought you don't support IOS at all anymore?

+config STARLET_MINI
+       bool "BootMii Starlet 'mini' firmware support"
+       depends on WII && EXPERIMENTAL

Given that this is the only supported starlet firmware interface,
does it make sense to expose the option to the user?

<big snip, see my "remove stuff" comment above>

+static void mipc_init_ahbprot(struct mipc_device *ipc_dev)
+{
+       void __iomem *hw_ahbprot;
+       u32 initial_ahbprot, ahbprot = 0;
+
+       hw_ahbprot = mipc_get_hw_reg(HW_AHBPROT_OF_COMPATIBLE);
+       if (!hw_ahbprot)
+               goto done;
+
+       initial_ahbprot = mipc_readl(hw_ahbprot);
+       if (initial_ahbprot != 0xffffffff) {
+               pr_debug("AHBPROT=%08X (before)\n", initial_ahbprot);
+               /* enable full access from the PowerPC side */
+               mipc_writel(0xffffffff, hw_ahbprot);
+       }
+
+       ahbprot = mipc_readl(hw_ahbprot);
+       if (initial_ahbprot != ahbprot)
+               pr_debug("AHBPROT=%08X (after)\n", ahbprot);
+done:
+       if (ahbprot != 0xffffffff)
+               pr_err("failed to set AHBPROT\n");
+}

Modern mini will always have AHBPROT set up to give you full access,
so this isn't needed either.

+#ifdef CONFIG_HLWD_PIC
+       /*
+        * Setup the Hollywood interrupt controller as soon as
+        * we detect that we are running under the mini firmware.
+        */
+       hlwd_pic_probe();
+#endif

Why?  The comment doesn't say.


Do you need this driver to boot?  If not, it might be best to leave it
out for now.


Segher

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to