sbcv2: initial basic PropIO probe
authorAlan Cox <alan@linux.intel.com>
Sat, 25 Aug 2018 18:13:59 +0000 (19:13 +0100)
committerAlan Cox <alan@linux.intel.com>
Sat, 25 Aug 2018 18:13:59 +0000 (19:13 +0100)
Use the uart console if we have no PropIO, otherwise default to the PropIO

Kernel/platform-sbcv2/sbcv2.s

index 925713b..a061855 100644 (file)
@@ -79,6 +79,15 @@ _platform_reboot:
 init_early:
            ; FIXME: code goes here to check for PropIO v2 nicely
            ; Passes the minimal checking
+           ld a,#0xA5
+           out (0xAB),a                ; Write A5 data
+           ld a,#0x55
+           out (0xAB),a                ; Overwrite
+           ld a,#0x00
+           out (0xAA),a                ; Issue a NOP
+           in a,(0xAB)
+           cp #0xA5                    ; Should see byte 1 again
+           ret nz
            ld hl,#0x0102
            ld (_ttymap+1), hl          ; set tty map to 0,2,1 for prop
            ret