# HG changeset patch # User Paul Boddie # Date 1699747516 -3600 # Node ID 413c97658f15d6a522086cf44e8c206a44193997 # Parent ba0ca04c6e22349edb5dbbff2dda7cad6b02d8e3 Employ a more elegant I/O bus arrangement for the CI20 examples. diff -r ba0ca04c6e22 -r 413c97658f15 conf/landfall-examples/mips-ci20-common.io --- a/conf/landfall-examples/mips-ci20-common.io Fri Nov 10 22:30:39 2023 +0100 +++ b/conf/landfall-examples/mips-ci20-common.io Sun Nov 12 01:05:16 2023 +0100 @@ -4,22 +4,16 @@ local hw = Io.system_bus() -Io.add_vbus("cpm", Io.Vi.System_bus +local bus = Io.Vi.System_bus { + AIC = wrap(hw:match("jz4780-aic")); CPM = wrap(hw:match("jz4780-cpm")); -}) - -Io.add_vbus("gpio", Io.Vi.System_bus -{ + DMA = wrap(hw:match("jz4780-dma")); GPIO = wrap(hw:match("jz4780-gpio")); -}) + LCD = wrap(hw:match("jz4780-lcd")); + HDMI = wrap(hw:match("jz4780-hdmi")); + I2C = wrap(hw:match("jz4780-i2c")); + SSI = wrap(hw:match("jz4780-ssi")); +} -Io.add_vbus("lcd", Io.Vi.System_bus -{ - LCD = wrap(hw:match("jz4780-lcd")); -}) - -Io.add_vbus("hdmi", Io.Vi.System_bus -{ - HDMI = wrap(hw:match("jz4780-hdmi")); -}) +Io.add_vbus("common", bus) diff -r ba0ca04c6e22 -r 413c97658f15 conf/landfall-examples/mips-ci20-fbdrv.cfg --- a/conf/landfall-examples/mips-ci20-fbdrv.cfg Fri Nov 10 22:30:39 2023 +0100 +++ b/conf/landfall-examples/mips-ci20-fbdrv.cfg Sun Nov 12 01:05:16 2023 +0100 @@ -10,19 +10,12 @@ -- Define general access to peripherals. local io_buses = { - cpm = l:new_channel(); - gpio = l:new_channel(); - hdmi = l:new_channel(); - lcd = l:new_channel(); + common = l:new_channel(); }; l:start({ caps = { - cpm = io_buses.cpm:svr(), - gpio = io_buses.gpio:svr(), - hdmi = io_buses.hdmi:svr(), - lcd = io_buses.lcd:svr(), - + common = io_buses.common:svr(), icu = L4.Env.icu, sigma0 = L4.cast(L4.Proto.Factory, L4.Env.sigma0):create(L4.Proto.Sigma0), }, @@ -35,7 +28,7 @@ l:start({ caps = { - vbus = io_buses.cpm, + vbus = io_buses.common, cpm = cpm:svr(), }, }, @@ -50,7 +43,7 @@ cpm = cpm, display = display:svr(), icu = L4.Env.icu, - vbus = io_buses.hdmi, -- for HDMI resource access + vbus = io_buses.common, -- for HDMI resource access }, }, "rom/dev_display_ci20_hdmi"); @@ -61,7 +54,7 @@ l:start({ caps = { - vbus = io_buses.lcd, + vbus = io_buses.common, fb = fbdrv_fb:svr(), cpm = cpm, display = display, -- needed by LCD driver diff -r ba0ca04c6e22 -r 413c97658f15 conf/landfall-examples/mips-ci20-fbterminal.cfg --- a/conf/landfall-examples/mips-ci20-fbterminal.cfg Fri Nov 10 22:30:39 2023 +0100 +++ b/conf/landfall-examples/mips-ci20-fbterminal.cfg Sun Nov 12 01:05:16 2023 +0100 @@ -11,19 +11,12 @@ -- Define general access to peripherals. local io_buses = { - cpm = l:new_channel(); - gpio = l:new_channel(); - hdmi = l:new_channel(); - lcd = l:new_channel(); + common = l:new_channel(); }; l:start({ caps = { - cpm = io_buses.cpm:svr(), - gpio = io_buses.gpio:svr(), - hdmi = io_buses.hdmi:svr(), - lcd = io_buses.lcd:svr(), - + common = io_buses.common:svr(), icu = L4.Env.icu, sigma0 = L4.cast(L4.Proto.Factory, L4.Env.sigma0):create(L4.Proto.Sigma0), }, @@ -36,7 +29,7 @@ l:start({ caps = { - vbus = io_buses.cpm, + vbus = io_buses.common, cpm = cpm:svr(), }, }, @@ -51,7 +44,7 @@ cpm = cpm, display = display:svr(), icu = L4.Env.icu, - vbus = io_buses.hdmi, -- for HDMI resource access + vbus = io_buses.common, -- for HDMI resource access }, }, "rom/dev_display_ci20_hdmi"); @@ -62,7 +55,7 @@ l:start({ caps = { - vbus = io_buses.lcd, + vbus = io_buses.common, fb = fbdrv_fb:svr(), cpm = cpm, display = display, -- needed by LCD driver @@ -79,7 +72,7 @@ l:start({ caps = { - vbus = io_buses.gpio, -- needed by input driver + vbus = io_buses.common, -- needed by input driver fb = fbdrv_fb, mag = mag_caps.mag:svr(), svc = mag_caps.svc:svr(), diff -r ba0ca04c6e22 -r 413c97658f15 conf/landfall-examples/mips-ci20-spectrum.cfg --- a/conf/landfall-examples/mips-ci20-spectrum.cfg Fri Nov 10 22:30:39 2023 +0100 +++ b/conf/landfall-examples/mips-ci20-spectrum.cfg Sun Nov 12 01:05:16 2023 +0100 @@ -11,19 +11,12 @@ -- Define general access to peripherals. local io_buses = { - cpm = l:new_channel(); - gpio = l:new_channel(); - hdmi = l:new_channel(); - lcd = l:new_channel(); + common = l:new_channel(); }; l:start({ caps = { - cpm = io_buses.cpm:svr(), - gpio = io_buses.gpio:svr(), - hdmi = io_buses.hdmi:svr(), - lcd = io_buses.lcd:svr(), - + common = io_buses.common:svr(), icu = L4.Env.icu, sigma0 = L4.cast(L4.Proto.Factory, L4.Env.sigma0):create(L4.Proto.Sigma0), }, @@ -36,7 +29,7 @@ l:start({ caps = { - vbus = io_buses.cpm, + vbus = io_buses.common, cpm = cpm:svr(), }, }, @@ -51,7 +44,7 @@ cpm = cpm, display = display:svr(), icu = L4.Env.icu, - vbus = io_buses.hdmi, -- for HDMI resource access + vbus = io_buses.common, -- for HDMI resource access }, }, "rom/dev_display_ci20_hdmi"); @@ -62,7 +55,7 @@ l:start({ caps = { - vbus = io_buses.lcd, + vbus = io_buses.common, fb = fbdrv_fb:svr(), cpm = cpm, display = display, -- needed by LCD driver @@ -79,7 +72,7 @@ l:start({ caps = { - vbus = io_buses.gpio, -- needed by input driver + vbus = io_buses.common, -- needed by input driver fb = fbdrv_fb, mag = mag_caps.mag:svr(), svc = mag_caps.svc:svr(),