q = ((a<<3) + a) >> 6
q = ((a<<6) + (a<<3) + a) >> 9
q = ((a<<9) + (a<<6) + (a<<3) + a) >> 12
q = ((a<<12) + (a<<9) + (a<<6) + (a<<3) + a) >> 15
...
and so on (in binary, 1/7 is .001001001...). Optionally, the result can be fixed with something like
r = a - q*7; while (r >= 7) { q++; r -= 7; }
The multiplication by 7 can be replaced with shifts and adds, of course.